Reply
Relative paths
Old 04-22-2006, 08:01 PM Relative paths
Skilled Talker

Posts: 66
Does anyone know why the relative path such as /administrative/stupid.htm is not the preferred way of doing things rather than the hard to remember, decipher, etc. method of ../../../adminstrative/stupid.htm.

Will one get in trouble with method number one as I surely find it easier to do and it works. Unfortunately, it seems like all books recommend the other method.

Thanks!
judyb is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-23-2006, 01:19 AM Re: Relative paths
ChipJohns's Avatar
I don't know! Do you?

Posts: 477
Name: Chip Johns
Location: Savannah Georgia
HI judyb,

actually both examples that you give are both relative paths.

the later is when you have to work your way down the directory path.

For instance here are examples of what might be the absolute path to each example that you gave to show you the correlation.

here is what the relative paths represent..


The page with the link using a relative path
www.site.com/level1/level2/level3/page.htm
to get to this page
www.site.com/level1/level2/level3/level4/lpage.htm
using relative path would be
level4/lpage.htm
------------------------------------

to get to this page
www.site.com/level1/page.htm
using relative path would be
../../page.htm (this takes you back the two levels needed to find the page)
I hope this is what you were asking!?

I personally like absolute paths. Both have their pros and cons.
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 04-23-2006, 07:32 AM Re: Relative paths
Skilled Talker

Posts: 66
Thanks, but I knew they were both relative paths. All my references say to use the ../../ type of path. I find the other kind easier and wondered why the ../../../ is preferred, and whether there will be any dire consequences in using it.

Why do you prefer absolute paths? It seems to me that somewhere I read they were slower.
judyb is offline
Reply With Quote
View Public Profile
 
Old 04-23-2006, 11:47 AM Re: Relative paths
Super Talker

Posts: 102
I prefer relative paths because by using that it doesn't really matter where you're files are located, the files can always find each other. Instead of using an absolute path, were things to change you'd need to do a lot of fixing paths. There are probably a few handy tools out there for that kinda purpose but why go trough the trouble anyway ...
ghettobert is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Relative paths
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13529 seconds with 12 queries