One of the things that I’ve been interested in for quite some time is how ideas spread on the web. Many bloggers do this instinctively when they post interesting links with a via link, a hat tip, or a nod to let people know where they originally saw the link.
Here’s the code:
Is the link element <a href="http://www.wats.ca/articles/missinglink/49">the unsung hero of HTML?</a> (via <a href="http://www.digitalmediaminute.com/archives/000513.html">Digital Media Minute</a>)
Nice. Now I know how he found it. But I wondered how John at Digital Media Minute find it? Google search? A random occurence? Did he see it because he happened to be following our site? And how did it spread from there? The little “via” links that Nick provided do just that.
While the via links give credit where credit is due, I’ve always thought it would be nice (and possibly useful) to take it one step further and actually semantically encode that relationship.
Establishing the relationship
The rel/rev attribute is valid on both the <link> element and on <a> elements. So why not encode the via link with this relationship in mind? Nick’s link to my article would then become:
Is the link element <a href="http://www.wats.ca/articles/missinglink/49">the unsung hero of HTML?</a> (via <a rel="via" href="http://www.digitalmediaminute.com/archives/000513.html">Digital Media Minute</a>)
This would require a custom profile definition in the head of the document, similar to what Eric Meyer, Matt Mullenweg and Tantek Celik did with XFN. The idea is simple – if you want to create custom relationships beyond what (X)HTML provides, create your own profile and link to it in the head of your document.
The only problem with the example above is that it defines a via linkage for the current page (i.e., the blog author’s post/site), and via links are usually used for pointing to external links.
We could always add another attribute to XHTML to give greater specificity. (Why not? it’s supposed to be extensible right? And normal graphical user agents would just ignore the attribute that they don’t understand.)
For this, we borrow from forms, where a label has an explicit association to a single form field by using the “for” attribute and specifying a value that is equal to the value of the id for the form field.
So, lets do the same for the <a>. Make for a valid attribute for an <a> and we can add that level of specificity. The whole package might look like:
Is the link element <a id="examplelink" href="http://www.wats.ca/articles/missinglink/49">the unsung hero of HTML?</a> (via <a rel="via" for="examplelink" href="http://www.digitalmediaminute.com/archives/000513.html">Digital Media Minute</a>)
In December of 2003 I had written about Changing the Scope of Link Relationships. Allowing the for attribute on the <link> element would allow for greater specificity and establishing relationships with just one portion of a document (essentially a node), rather than the relationship to the whole document. Using it for via links would be just one further application – the relationship could also be placed in the <head> with a <link>:
<link rel="via" for="examplelink" href="http://www.digitalmediaminute.com/archives/000513.html" />
What’s the point?
I’m not sure if it would be useful to do this or not. I can see applications for it – as the title of this post suggests, it could be used to track the spread of ideas on the web. Would I like to know how someone found out about something I had written? Certainly. I could always write a bot that would take an end point URL and find its way back to the original article using these links.
It might also be interesting to add this feature to Bloglines Citations, or to Technorati so that not only do you see who is linking to you, you also find out how they found out about it. Perhaps that would provide more insight into what people are reading, how information spreads and help you to… well, I’m not sure what you’d do with the information, but I’m betting it would be interesting anyway. Would it be worth it? I’m not sure…