FTP URLs are
used to point to files located on FTP servers-usually anonymous FTP servers;
that is, the ones that allow you to log in using anything y mouse as the login ID and your email address as the password. FTP
URLs also follow the standard URL form, as shown in the following examples:
ftp://ftp.foo.fom/home/foo
ftp://ftp.foo.com/home/foo/homepage.html
because you can
retrieve either a file or a directory list with FTP, the restrictions on
whether you need a trailing slash at the end of the URL aren’t the same as with
HTTP the first URL here retrieves a listing of all the files in the foo
directory. The second URL retrieves and parses the file homepage. html in the
foo directory.
NOTE
Navigating FTP
servers using a web browser can often be much slower than navigating them using
FTP it self because the browser doesn’t the
connection open. Instead, it opens the the connection, finds the file or
directory listing, displays the listing, and then closes down the FTP
connection .if you select a link to open a file or another directory in that
listing, the browser constructs a new FTP URL from the items you selected
response the FTP connection by using the new UR, gets the next directory or
file, and closes it exactly which file you want to retrieve rather than for
when you want to browse an archive.
Although your
browser uses FTP to fetch the file, if it’s an HTML file, your browser will display
it just as it would were it fetched using the HTTP protocol. Web browsers don’t
care how they get files. As long as they can recognize the files as HTML,
either because the server explicitly says that the file is HTML or by the
file’s extension, browsers will parse and display that file as an HTML file. If
they don’t recognize it as an HTML file, no big deal. Browsers can either
display the file if they know what kind of file it is or just save the file to
disk.
NON-ANONYMOUS
FTP
All the FTP URLs
in the preceding section are used for anonymous FTP serves. You also can
specify an FTP URL for named accounts on
an FTP server, like the following:
ftp://username:password@ftp.foo.co,home/foo/homepage.html
in this form of
the URL, the username part is your login ID on the server, and password is that
account’s password’s password. note that no attempt is made to hide the
password in the URL. Be very careful that no one is watching you when you’re
using URLs of this form-and don’t put them into links that someone else can
find!
Furthermore, the
URLs that you request might be cached or logged somewhere, either on your local
machine or on a proxy server between you and the site you’re connecting to. For
that reason, it’s probably wish to avoid using this type of non-anonymous
FTPURL. Altogether.
No comments:
Post a Comment