Click here to get back home

Any downside to root-relative paths?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Any downside to root-relative paths? Lars Eighner 10-10-2007
Posted by Lars Eighner on October 10, 2007, 5:52 am
Please log in for more thread options

Aside from the deaths of a few extra electrons to spell out the whole root
relative path, is there any down side? It seems to me that theoretically it
shouldn't make any difference, and it would make it much easier to slap
modualar blocks of markup into page frameworks, which may change and so
forth. And the few extra bytes, which even for a fairly large site would
not amount to as many bytes as are in a fairly small low-res image, should
not make much difference to the server. So my main concern is whether there
is some hidden performance hit on the browser end such as sometimes occur in
anti-social browsers (Hi, IE!)?

--
Lars Eighner <http://larseighner.com/> <http://myspace.com/larseighner>
Countdown: 468 days to go.
What do you do when you're debranded?

Posted by Ben C on October 10, 2007, 6:40 am
Please log in for more thread options
>
> Aside from the deaths of a few extra electrons to spell out the whole root
> relative path, is there any down side? It seems to me that theoretically it
> shouldn't make any difference, and it would make it much easier to slap
> modualar blocks of markup into page frameworks, which may change and so
> forth.

Never mind about the few extra bytes. The electrons don't die anyway,
they get recycled.

The downside of absolute paths is that when you want to move the whole
lot, lock stock and barrel to a different directory, you have to change
all the paths.

Posted by Jukka K. Korpela on October 10, 2007, 2:53 pm
Please log in for more thread options
Scripsit Ben C:

>>
>> Aside from the deaths of a few extra electrons to spell out the
>> whole root relative path, is there any down side? It seems to me
>> that theoretically it shouldn't make any difference, and it would
>> make it much easier to slap modualar blocks of markup into page
>> frameworks, which may change and so forth.
>
> Never mind about the few extra bytes. The electrons don't die anyway,
> they get recycled.

Well, electrons _are_ mortal, really. They may innihilate when they get too
close to antimateria, for example.

> The downside of absolute paths is that when you want to move the whole
> lot, lock stock and barrel to a different directory, you have to
> change all the paths.

Right. And root-relative paths (which start with "/") - which is what the
question was about - have basically the same problem, though they _may_
survive a move from a server to another (when the server file systems are
sufficiently similar).

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Posted by Lars Eighner on October 10, 2007, 5:12 pm
Please log in for more thread options
the lovely and talented Jukka K. Korpela broadcast on
comp.infosystems.www.authoring.html:

> Scripsit Ben C:

>> The downside of absolute paths is that when you want to move the whole
>> lot, lock stock and barrel to a different directory, you have to
>> change all the paths.

> Right. And root-relative paths (which start with "/") - which is what the
> question was about - have basically the same problem, though they _may_
> survive a move from a server to another (when the server file systems are
> sufficiently similar).

Oh, yes. I recall now why I rejected root-relative paths, years ago, when I
last investigated them. I could not get (internal) links to work both on
the local test server and on the web server. But this discussion clarified
my thinking, and I find using a virtual host on the local test server is my
answer.

--
Lars Eighner <http://larseighner.com/> <http://myspace.com/larseighner>
Countdown: 467 days to go.
What do you do when you're debranded?

Posted by Ben C on October 10, 2007, 5:29 pm
Please log in for more thread options
> Scripsit Ben C:
>
>>>
>>> Aside from the deaths of a few extra electrons to spell out the
>>> whole root relative path, is there any down side? It seems to me
>>> that theoretically it shouldn't make any difference, and it would
>>> make it much easier to slap modualar blocks of markup into page
>>> frameworks, which may change and so forth.
>>
>> Never mind about the few extra bytes. The electrons don't die anyway,
>> they get recycled.
>
> Well, electrons _are_ mortal, really. They may innihilate when they get too
> close to antimateria, for example.

True. Now that I come to think of it I have actually configured my
browser to physically annihilate the electrons whenever I leave a page.
There's a checkbox for it in the Settings somewhere, under "Privacy" or
"Security" I think.

>> The downside of absolute paths is that when you want to move the whole
>> lot, lock stock and barrel to a different directory, you have to
>> change all the paths.
>
> Right. And root-relative paths (which start with "/") - which is what the
> question was about - have basically the same problem, though they _may_
> survive a move from a server to another (when the server file systems are
> sufficiently similar).

I thought an absolute path did start with a "/", or do you mean
something different by "root-relative"?

But this does raise another annoyance with absolute paths, which is that
they are more OS-dependent. On Windows they start with C: or something,
for example, on other systems something else. So not good if one day you
want to host everything on a different server with a different OS.
Relative paths are more portable.

Similar ThreadsPosted
[Q] obtaining relative paths within a html page? February 9, 2005, 1:57 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap