[thelist] dot_slash vs slash for relative reference..

.jeff jeff at members.evolt.org
Tue Jul 23 23:07:01 CDT 2002


> From: Shashank Tripathi
> I noticed recently on some websites that images (all
> cacheable items) are refered in a relative way as
>     ./images
> instead of,
>     /images
> for example.
> Wondering if there is any benefit in doing so? An
> example is www.epiphany.com, and it loads pretty
> fast -- which of course could be a function of many
> things, but wondering if above relative reference makes
> a difference.

the way images are referenced won't change how fast a site loads as all references are converted to absolute references internally by the browser as it parses the document.

there is a benefit to root relative, or leading slash, paths.  if you change your sites document structure, but images, scripts, and stylesheets are all still in the same folders you won't have to go change the paths to get them all working again as root relative paths are not in anyway relative to the calling document's location from the root of the site.


jeff at members.evolt.org

More information about the thelist mailing list