Other URL Schemes
In this section I'll briefly mention a few other commonly used URL schemes. This is by no means an exhaustive reference. If you require more information on URIs and URI schemes, a list of documents that will help is mentioned at the bottom.
mailto scheme is an example of an opaque URI scheme.
mailto URLs identify someone's e-mail address. Their syntax
is simple. You have the scheme name, the colon, and then the e-mail
address. If you're someone who has a thing for collecting e-mail
addresses, you might refer to yourself in the following ways:
mailto:firstname.lastname@example.org mailto:email@example.com mailto:firstname.lastname@example.org mailto:email@example.com mailto:firstname.lastname@example.org
(I have more. Don't ask, OK? Just don't ask). An important note here is that somewhere along the way someone came up with the brilliant idea of including the subject of an e-mail in the URL, like this:
If you've been paying attention, you'll realize the problem with
this. It doesn't make sense: what resource does it identify? URIs
identify resources, and don't do anything else. A program might
process a mailto URL by sending e-mail to the person, but it might do
something else instead; add it to your addressbook, add it to your
killfile so you don't see his e-mail, or anything else. There is also a
second very important problem with the above syntax: a user agent that
doesn't understand it (and there are many) but does understand normal
mailto syntax will try to send mail to the address
email@example.com?subject=Feedback, which is not a
valid e-mail address. So even though you might see the above used some
times in HTML, don't use it. And if you want to do the world a favor,
mail the person who did and tell them not to do it, citing the reasons
ftp scheme is very similar to the
scheme, and is used to locate files available via FTP (File Transfer
Protocol). The syntax is very similar to
The above URL points to the FTP server on
sunsite.unc.edu, to the file
ls-lR.gz in the
/pub/Linux directory. It is also possible to specify a
username and optionally, a password for the connection. The syntax is
Note that supplying a password like this is sometimes a bad idea. Some people might tell you this is a huge security risk, but this is not really true: a URL like the one above is typed into your browser will only be a risk if someone peeps over your shoulder and sees the password. The password itself is transmitted unencrypted anyway, and can be intercepted in transit. Before you go paranoid about this, remember that if your read your mail through POP (Post Office Protocol), like most people do, then your mail password is also transmitted in the clear. The lesson in this is that if you're going to be paranoid, at least do it for the right reasons.
file scheme is used to point to files on your
computer. It is slightly tricky, because (most) absolute
file URLs aren't really absolute; they're always relative
to your computer. However, you can specify the hostname in a file URL.
Remember that a URL just tells you where a resource is located, not
how to locate it. So this does make sense. If the hostname is
omitted, the current host is assumed. If a URL is encountered by a
program with a hostname that's different than the one it's working on,
it will most likely decide that it cannot access the file, but this has
nothing to do with the URL itself. The syntax is again much like the
http syntax, only omitting the port numbers, like this:
Note that the pathname here represents a path name in the local filesystem, so the slashes are usually replaced by a more appropriate character before the file is accessed. Unix uses slashes, Windows uses backslashes, Macintosh and other operating systems use other conventions.
news scheme is another opaque URL scheme. It is used
to refer to Usenet newsgroups or specific messages within these
newsgroups. It has two possible syntaxes. One is the name of a Usenet
newsgroup, and the other is the message id of a Usenet post. Note that
the message id must be entered without the usual angle brackets
news:comp.infosystems.www.authoring.html news:ba-ciwah-1998Jun4firstname.lastname@example.org news:*
The third example points to all available newsgroups and can be used to refer to Usenet in general.
telnet scheme has identical syntax to the
ftp scheme, with the exception that there is no pathame.
Only a hostname, and optionally a port, username and password may be
The above indicates a telnet session for user "stephanos" with password "secret" on port 35 of somehost.internet.com.
OK, boys and girls. That was the theory. Now let's get down to the nitty gritty...