Link to home
Start Free TrialLog in
Avatar of MChild
MChild

asked on

Root-relative versus document-relative links

Is it better to use root-relative links or document-relative links? I am writing simple HTML code, no dynamic loading of pages, and I have heard different opinions about this. It seems that if you don't expect the subdirectories to change then document-relative links should be okay. The webpages concerned are static: they are electronic versions of annual reports, etc. which have been released in hard copy, and each one consists of a collection of subdirectories containing several documents (linked to the contents.htm and index.htm pages) which should not change once they are uploaded to a website.
ASKER CERTIFIED SOLUTION
Avatar of dorward
dorward

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think dorward has hit on the primary reason for keeping the links document- relative...portability.  The only time is use root-relative links is for secure
ass on intranets where I need access limitations resident on the local domains
on the local domains.

For general purpose apps an just about everything on the Internet, document-
relative, is the best way to go.

Cd&
Avatar of MChild
MChild

ASKER

Thanks, I will also be putting some of these onto CD so that's a good point.