Absolute vs. Relative Links

May 2, 2009

A link which shows the full URL of the page being linked at. Some links only show relative link paths instead of having the entire reference URL within the a href tag. Due to canonicalization and hijacking related issues it is typically preferred to use absolute links over relative links.

Example absolute link

<a href=”http://customdesigntools.com/folder/filename.html”>Cool Stuff</a>

Example relative link

<a href=”../folder/filename.html”>Cool Stuff</a>

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

{ 1 comment… read it below or add one }

1 Peter December 19, 2009 at 2:35 pm

Relative links are much easier to maintain as compared to absolute links, especially in case of change in server URL
Peter´s last blog ..The Ultimate image optimizing guide! My ComLuv Profile

Leave a Comment

CommentLuv Enabled

Previous post:

Next post: