Page is a not externally linkable
- Marketing and Biz Dev
-- Link Development
---- Relative or Absolute Links - Which are Better ?


g1smd - 4:09 pm on Jul 19, 2010 (gmt 0)


I prefer root-relative links like "/that-page" or "/some-folder/some-stuff", always with a leading slash.

With the site URL structure not at all being the same as the server internal folder structure, when using relative URLs (URLs that do NOT begin with a leading slash) it's not a simple thing to work out where the e.g. images folder URL is relative to the containing virtual URL folder the current HTML pageview is being served as.

When that resource is linked as "/media/thumbs/somepic.png" there's no ambiguity to programmer, user or SE bot alike as you're "counting from the root"

Never, ever, use the leading dot "../../../some-resource" construct. You're playing with fire.


Thread source:: http://www.webmasterworld.com/link_development/4168539.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com