HTML and CSS Reference
Navigating FTP servers using a web browser can often be much
slower than navigating them using FTP itself because the browser
doesn't hold the connection open. Instead, it opens the connec-
tion, 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, reopens the FTP connection
by using the new URL, gets the next directory or file, and closes it
again. For this reason, FTP URLs are best for when you know
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 if it were fetched using HTTP. Web browsers don't care how
they get files. As long as they can recognize the file 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.
All the FTP URLs in the preceding section are used for anonymous FTP servers. You
also can specify an FTP URL for named accounts on an FTP server, like the following:
ftp:// username:password @ftp.foo.com/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. 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 wise to avoid using this type of non-anonymous FTP URL
The mailto URL is used to send electronic mail. If the browser supports mailto URLs,
when a link that contains one is selected, the browser will prompt you for a subject and
the body of the mail message, and send that message to the appropriate address when