About Relative vs Absolute URLs
Why change to using Relative URL's ?
Which URL type to use - Absolute or Relative?
This is one of the most fundamental questions in web site design.
I have always prefered relative URLs as they help in web site maintenance. Also, it's easy to transfer a web site from one domain name to another. If you had used absolute URLs in all links and SRC attributes, you'd have a difficult time updating each link on each page. With the use of relative URLs you have no such problems.Absolute URL
An absolute URL determines the exact location of a file/directory on the internet. Each absolute URL is unique, which means that if two are identical, they point to the same file.
For example:
www.bae.ncsu.edu/programs/index.html specifies file under a directory, under www.bae.ncsu.edu domain name.
Similarly, the absolute URL of the document you are viewing is: http://www.bae.ncsu.edu/support/comp_support/relative_links.htmlRelative URL
A relative URL points to a file/directory in relation to the present file/directory.
Consider the examples from above.
We can access www.bae.ncsu.edu/programs/index.html using a relative URL as
../programs/index.htmlReturn to: Computer Support