By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,665 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,665 IT Pros & Developers. It's quick & easy.

Any downside to root-relative paths?

P: n/a

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?
Oct 10 '07 #1
Share this Question
Share on Google+
15 Replies


P: n/a
On 2007-10-10, Lars Eighner <us****@larseighner.comwrote:
>
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.
Oct 10 '07 #2

P: n/a
On 10/10/2007 2:52 AM, Lars Eighner wrote:
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!)?
My paths are all relative.

When my daughter registered a personal domain for me as a gift, it was
easy to implement. This involved changing
<http://www.vcnet.com/~rossdeinto <http://www.rossde.com/>.
Negotiating the change with my ISP took a while (~30 minutes). However,
I did not have to change a single HTML file.

--
David E. Ross
<http://www.rossde.com/>

Natural foods can be harmful: Look at all the
people who die of natural causes.
Oct 10 '07 #3

P: n/a
Scripsit Ben C:
On 2007-10-10, Lars Eighner <us****@larseighner.comwrote:
>>
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/

Oct 10 '07 #4

P: n/a
In our last episode, <gc*********************@reader1.news.saunalahti.f i>,
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?
Oct 10 '07 #5

P: n/a
On 2007-10-10, Jukka K. Korpela <jk******@cs.tut.fiwrote:
Scripsit Ben C:
>On 2007-10-10, Lars Eighner <us****@larseighner.comwrote:
>>>
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.
Oct 10 '07 #6

P: n/a
Ben C wrote:
>
I thought an absolute path did start with a "/", or do you mean
something different by "root-relative"?
Assuming that, in the context of HTML, "paths" are URI references, then,
an absolute URI is an URI of the form http://domain/resource/, while an
absolute path is of the form /resource/ or //domain/resource/
I guess that Ben C calls absolute paths "root-relative".

See RFC-3986.

--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Oct 10 '07 #7

P: n/a
André Gillibert wrote:

I guess that Ben C calls absolute paths "root-relative".
Correction: I guess that Jukka K. Korpela calls absolute paths
"root-relative".

--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Oct 10 '07 #8

P: n/a
Lars Eighner wrote:
In Windows, of course, "/" is nonsense, but even in Unix-like systems.
In Windows, /some/path is a path relative to the current drive root.
e.g. If the current directory is E:/some/where/, then /else/where/ is
refering to E:/else/where/.
--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Oct 10 '07 #9

P: n/a
Scripsit André Gillibert:
>I guess that Ben C calls absolute paths "root-relative".
Correction: I guess that Jukka K. Korpela calls absolute paths
"root-relative".
No, I used "root-relative" to mean 'relative to the server root', which I
assumed to be what the original question meant. Technically, we should not
discuss paths but URLs here, and using the terminology of URL
specifications, with a reference to them, we would avoid all ambiguity,
though perhaps at the cost of understandability.

Anyway, "root-relative", in the sense of a URL that is relative to the
server URL, means something that starts with a (single) slash "/". What
follows it shall be taken as relative to the root of the implied server
("implied" in the sense that it is defined by the applicable base URL).

(If we take the concept of root-relativity as applying strictly to _paths_,
i.e. path parts of URLs, then it becomes a useless concept since _all_ paths
in http URLs are root-relative.)

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

Oct 11 '07 #10

P: n/a
On 2007-10-11, Jukka K. Korpela <jk******@cs.tut.fiwrote:
Scripsit André Gillibert:
>>I guess that Ben C calls absolute paths "root-relative".
Correction: I guess that Jukka K. Korpela calls absolute paths
"root-relative".

No, I used "root-relative" to mean 'relative to the server root', which I
assumed to be what the original question meant. Technically, we should not
discuss paths but URLs here, and using the terminology of URL
specifications, with a reference to them, we would avoid all ambiguity,
though perhaps at the cost of understandability.

Anyway, "root-relative", in the sense of a URL that is relative to the
server URL, means something that starts with a (single) slash "/". What
follows it shall be taken as relative to the root of the implied server
("implied" in the sense that it is defined by the applicable base URL).

(If we take the concept of root-relativity as applying strictly to _paths_,
i.e. path parts of URLs, then it becomes a useless concept since _all_ paths
in http URLs are root-relative.)
Thanks everyone. I get it now. I _was_ confusing paths and URLs.
Oct 11 '07 #11

P: n/a
On 2007-10-10, Lars Eighner wrote:
>
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!)?
I now use relative paths to all pages (I haven't yet converted all
my older pages). This allows me to develop and view the site on my
local machine and then copy new or changed files to the real site.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Oct 11 '07 #12

P: n/a
Stan Brown wrote:
Thu, 11 Oct 2007 00:20:16 +0200 from André Gillibert
<ta*****************@yahodeletethato.fr>:
>Lars Eighner wrote:
In Windows, of course, "/" is nonsense, but even in Unix-like systems.

In Windows, /some/path is a path relative to the current drive root.
e.g. If the current directory is E:/some/where/, then /else/where/ is
refering to E:/else/where/.

I don't think so. I just cobbled up this file:
I was talking about file paths, not URI references.
/ in CreateProcess, CreateFile, or any other Win32 function, will refer to
the root drive of the current directory.

I think this is yet another case of IE guessing what an author means
and Mozilla honoring what an author says. Some will say this is why
IS is better. Sigh.
No, IE isn't wrong in following the local convention. The file URI
specification (in RFC-1738) is very vague.
The obsolete hoffman file URI draft
(http://tools.ietf.org/html/draft-hoffman-file-uri-03) doesn't help much.

--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Oct 12 '07 #13

P: n/a
Jukka K. Korpela wrote:
Scripsit André Gillibert:
>>I guess that Ben C calls absolute paths "root-relative".
Correction: I guess that Jukka K. Korpela calls absolute paths
"root-relative".

No, I used "root-relative" to mean 'relative to the server root', which
I assumed to be what the original question meant.
Yes, that's what RFC-3986 calls absolute paths, or, more exactly,
path-absolute.

In http://www.ietf.org/rfc/rfc3986.txt:
| URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
|
| hier-part = "//" authority path-abempty
| / path-absolute
| / path-rootless
| / path-empty
|
| URI-reference = URI / relative-ref
|
| absolute-URI = scheme ":" hier-part [ "?" query ]
|
| relative-ref = relative-part [ "?" query ] [ "#" fragment ]
|
| relative-part = "//" authority path-abempty
| / path-absolute
| / path-noscheme
| / path-empty
|
| scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
|
|
| path-abempty = *( "/" segment )
| path-absolute = "/" [ segment-nz *( "/" segment ) ]
| path-noscheme = segment-nz-nc *( "/" segment )
| path-rootless = segment-nz *( "/" segment )

Jukka K. Korpela wrote:
Technically, we should not discuss paths but URLs here, and using the
terminology of URL specifications, with a reference to them, we would
avoid all ambiguity, though perhaps at the cost of understandability.
I prefer to use the RFC-3986 ontology.
BTW: /hello/world isn't an URI or URL. It's an URI reference (more
accurately, a path-absolute).

--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Oct 12 '07 #14

P: n/a
Fri, 12 Oct 2007 18:58:16 +0200 from André Gillibert
<ta*****************@yahodeletethato.fr>:
Stan Brown wrote:
Thu, 11 Oct 2007 00:20:16 +0200 from André Gillibert
<ta*****************@yahodeletethato.fr>:
Lars Eighner wrote:

In Windows, of course, "/" is nonsense, but even in Unix-like systems.

In Windows, /some/path is a path relative to the current drive root.
e.g. If the current directory is E:/some/where/, then /else/where/ is
refering to E:/else/where/.
I don't think so. I just cobbled up this file:

I was talking about file paths, not URI references.
/ in CreateProcess, CreateFile, or any other Win32 function, will refer to
the root drive of the current directory.
Sorry -- I thought we were discussing HTML.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Oct 12 '07 #15

P: n/a
Stan Brown wrote:

>I was talking about file paths, not URI references.
/ in CreateProcess, CreateFile, or any other Win32 function, will refer
to
the root drive of the current directory.

Sorry -- I thought we were discussing HTML.
I'm sorry too. I should have understood from the context, what you were
refering to. :)

--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Oct 12 '07 #16

This discussion thread is closed

Replies have been disabled for this discussion.