ABSOLUTE Absolute URLs refer to the entire URL.
| http://www.someplace.com/page.html | No matter where the link originates or who types it into the address bar, this URL can be located precisely (absolutely). Ther is no doubt as to the server and the page being requested. Any references to an outside site must use an ABSOLUTE URL.
RELATIVE Relative URLs refer to a file or page on the same server.
page.html
images/image.gif
../info/page2.html | RELATIVE URLs can only be used for files kept on the originating server. The above example shows the 3 types of Relative URLs.
| page.html |
is a file located in the "root" directory. |
| image.gif |
is a file located in a subdirectory called "images" off the root directory. |
| ../ |
is used when the subdirectory is not part of the default root directory. It states : Take the main root directory, find the folder called "info", then access the file called "page2.html" |
It depends on the server and file setup as to which type to use. If there is any doubt, using an ABSOLUTE URL will work every time.
----------------- Article by David Stanley. Visit his site http://www.htmlite.com. Reprinted with permission.
|