473,241 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Any downside to root-relative paths?


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
15 6418
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lawrence | last post by:
My company is leasing a server from Interland, which is a very large web hosting company. I assume Interland knows how to set up a BSD server with the usual add-ons, including PHP. But when I run...
4
by: cplusplus | last post by:
Hello, I have newbie question. I'm stuck on this current assignment. Write a program that prompts the user for two integer values, passes the values to a function where they are multiplied...
15
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
13
by: Kishor | last post by:
Hi Friends Please help me to write a C program to find the 5th (fifth) root of a given number. Ex:(1) Input : 32 Output : 5th root of 32 is 2 Ex:(1) Input : 243 Output : 5th root of 243 is...
2
by: Clint Olsen | last post by:
Hello: I posted a thread on comp.programming awhile back asking about an algorithm I implemented on square root. The idea was to use the square root of a prime number as a convenient way to get...
12
by: David Berman | last post by:
Whenever I want to create a C# / asp.net based web site, Visual Studio always requires a subdirectory for the project. So when I make my site, for example abcinc.com, the web site ends up at...
19
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However...
3
by: Nalaka | last post by:
Hi, I have an asp.net web application (www.myWebSite), and a subweb application (www.myWebSite/subSite). How do I set it so that, subweb application (www.myWebSite/subSite) be the root...
2
by: shiva359 | last post by:
Hi , could someone throw some light on why do default software when installed ( as root for creating an instance leaves us with some world accessable directories & some ...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.