Create an Account
username: password:
 
  MemeStreams Logo

Things I learn today: Hyperlink madness

search

Acidus
Picture of Acidus
My Blog
My Profile
My Audience
My Sources
Send Me a Message

sponsored links

Acidus's topics
Arts
Business
Games
Health and Wellness
Home and Garden
Miscellaneous
Current Events
Recreation
Local Information
Science
Society
Sports
Technology

support us

Get MemeStreams Stuff!


 
Things I learn today: Hyperlink madness
Topic: Technology 4:00 pm EST, Jan  9, 2007

There are many way to specify a URL in a hyperlink. For all these examples, assume the user is currently looking at the page http://www.memestreams.net/topics/

For example, this is an absolute URL:
http://www.memestreams.net/topics/

Absolute URLs tell the browser what protocol to use (HOW), what hostname to contact (WHERE), and what resource to grab (WHAT).

You can specify an relative URL:

/topics/

In this can, the URL is relative to where the user currently is. The browser already knows it is using the HTTP protocol (HOW), it already knows the hostname (WHERE). The link simply tells the browser the resource to grab (WHAT).

Most people, including me, think that there is no way to create a hyperlink pointing to a different WHERE than you are currently on without specifying the HOW. For example, the following hyperlink does not take you to msblabs.org

msblabs.org/headers.php

Instead the browser links see this as the equivalent of following, which does not exist.

http://www.memestreams.net/topic/msblabs.org/headers.php,

The browser doesn't know that the msblabs.org specifies the WHERE, and is not part of the WHAT.

However, there is a way to define a hyperlink that points to a different WHERE without specifying the HOW.

//msblabs.org/headers.php

This URL construction is perfectly valid, and the // lets the browser know that it should fetch this resource using the current HOW, but that the text after the // but before the / specifies a new WHERE. Yes this is messed up. Yes its in the RFC spec. Yes there are sites in the wild like SlashDot that use this form.

And yes, I still want to punch Tim Berners-Lee in the face.



 
 
Powered By Industrial Memetics
RSS2.0