Monday, October 25, 2004

 

The Structure of a URL

A URL (pronounced You-Are-Ell), or Uniform Resource Locator, is a fancy way of saying an address for information on the Internet. If you hear URL, just think "address" or "location." URLs differ based on how specific you need to be.

URLs can be absolute (complete) or relative (partial):

All HTML documents can use URLs to link to other information. URLs, in turn, can point to many different things, such as HTML documents, other sites on the Internet, or even images and sound files.

URLs are case sensitive. On some computers, typing a filename such as Kitten.html is very different from typing kitten.html. If you create a filename that uses special capitalization (instead of, say, using all lowercase characters), you must use this same capitalization the same way every time you link to the document. (It'd be easier for you and your readers to use just lowercase.)

If you're not used to them, URLs can be pretty odd looking. Each part of a URL has a built-in specific meaning, however, much like each part of your home address. The street address "12 Fritter Lane, Apartment G, Santa Clara, CA 95051," for example, provides a postal carrier with essential and complete information — the specific apartment in a specific building on a specific street in a specific town in a specific state in a specific ZIP code. Specifically.

URLs work the same way by providing a browser with all the parts it needs to locate information. A URL consists of the protocol indicator, the hostname, and the directory name and/or filename. The following (fictitious) URL is an example of an absolute URL:

http://cat.feline.org/fur/fuzzy.html

Following is a description of each URL part:

Sometimes, URLs have a hostname with a port number at the end (for example, cat.feline.org:80). This number gives the server more precise information about the URL. If you see a URL with a number, just leave the number on the URL. If you don't see a number, don't worry about it.

Try to avoid creating directory names or filenames with spaces or other unusual characters. Stay with letters (uppercase and lowercase), numbers, underscores (_), periods (.), or plus signs (+). Some servers have problems with odd characters. In addition, if you do use any capitalization in your filenames, you must also use the same capitalization in any links pointing to those files because some servers require consistent capitalization.


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?