About us Privacy Disclaimer Contact us
FAQ Help Advertising Feedback
Home Sitemap Search Donate us

  Home > Computer & I'net > Absolute VS Relative...

   Browse by title articles:
   What is hot:

Coding Code

Doctype

Absolute VS Relative

Image Maps

Nesting Tables

COLGROUP & COL

Getting Honest With The Search Engines
Files - 4
Logging with PHP
Email - Headers
Prev articles1234567 8 910Next articles



Absolute VS Relative


Computer & I'net articlesAbsolute VS Relative

by David Stanley    



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.





Holiday spending




  Disclaimer | Privacy | Terms of useCopyright © 2004 Nice2know.com