Mark Eost wrote:
Thanks for answering my question. If I did use the full path, assuming I don't want to move the site, does that mean every time somebody clicked on a link the browser would send multiple requests?
Let's say you have 1 page and in this page you include 3 images, 1 java script file and 1 css file.
If you use absolute paths and include all these elements like: <img src="http://mydomain.com/images/etc." />, <script src="http://mydomain.com/scripts/etc." /> the browser will send 5 different http requests, which is completely useless, because all your files are located under the same domain. The browser will look for "http://mydomain.com" again and again.
Regarding the linked pages, the main problem is that one with website moving. Ok, if you don't want to move your website on another domain, you can live with this, or you can read a little about the tag <base>. If properly used, <base> will make your life much easier. For example, you just define your <base href="http://mydomain.com"> then put all the links, src, hrefs etc. starting from the "base". For example, if you want to include an image in a page located 5 folders in depth, you don't need anymore to say:
<img src="../../../../../images/myimage.jpg" /> or
<img src="http://mydomain.com/images/myimage.jpg" />,
you will just write:
<img src="images/myimage.jpg" />
or for a hyperlink:
<a href="services/mynumber3service.html">My services</a>
However this technique is better used in combination with some php programming.