Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Relative or Full Path
February 3, 2004, 12:13 am
rate this thread
("http://www.host.com/images/photo1.jpg") versus a relative one
1) is there any difference in the time it takes to receive the image in the
2) Any difference in caching the image so it's already loaded on subsequent
pages?...ie does it force the image to fully reload each time?
3) Any reason not to use the full path, other than it adds just that much more
code (hence file size) to an HTML file?
Re: Relative or Full Path
I doubt it, except maybe the extra half a micro-millisecond it takes to
parse the extra few bytes in the address. :-)
If you change your domain, you have to change all of the links (easy
enough with a find and replace tool, but better not to have to do it at
Also, when you are testing locally, it will always download the images
from the web, rather than local.
Personally, I use absolute URLs (/images/foo.png) rather than relative
(../../../images/foo.png). I find them much easier to manage. :-)