A couple of weeks ago, I went to a w3c workshop about annotations on the web. It was an interesting day, hearing from academics, implementers, archivists and publishers about the ways they want to annotate things on the web, in the world, and in libraries. The more I listened, the more I realised that this was what the web is about. Each page that links to another one is an annotation on it.
Tim Berners-Lee's invention of the URL was a brilliant generalisation that means we can refer to anything, anywhere. But it has had a few problems over time. The original "Cool URLs don't change" has given way to Tim's "eventually every URL ends up as a porn site".
Instead of using URLs, Google's huge success means that searching for text can be more robust than linking. If I want to point you to Tom Stoppard's quote from The Real Thing:
the search link is more resilient than linking to Mark Pilgrim's deleted post about it, which I linked to in 2011.I don’t think writers are sacred, but words are. They deserve respect. If you get the right ones in the right order, you can nudge the world a little or make a poem which children will speak for you when you’re dead.
Another problem is that linking in HTML is defined to address pages as a whole, or fragments within them, but only if the fragments are marked up as an id on an element. I can link to a blog post within a page by using the link:
http://epeus.blogspot.com/2003_02_01_archive.html#post-body-90336631
because the page contains markup:
<div class="post-body entry-content" id="post-body-90336631" >
But to do that I had to go and inspect the HTML and find the id, and make a link specially, by hand.
What if instead we combined these two ideas:
- use a fragment to identify part of a page
- mention words in the page as the identifier
I've named these "fragmentions"
To tell these apart from an id link, I suggest using a double hash - ## for the fragment, and then words that identify the text. For example:
http://epeus.blogspot.com/2003_02_01_archive.html##annotate+the+web
means "go to that page and find the words 'annotate the web' and scroll to show them"
If you click the link, you'll see that it works. That's because when I mentioned this idea in the indiewebcamp IRC channel, Jonathan Neal wrote a script to implement this, and I added it to my blog and to kevinmarks.com. You can add it to your site too.
However, we can't get every site to add this script. So, Jonathan also made a Chrome Extension so that these links will work on any site if you're running Chrome. (They degrade safely to linking to the page on other browsers).
So, try it out. Contribute to the discussion on the Indiewebcamp Fragmentions page, or annotate this page by linking to it with a fragmention from your own blog or website.
Maybe we can persuade browser writers that fragmentions should be included everywhere.
Originally posted on kevinmarks.com
8 comments:
This is a beautiful idea, and one that nicely maps to the way I frequently re-find content.
However, the "link to an arbitrary place in a document" problem isn't that challenging. You might take a look at
Using CSS Selectors as Fragment Identifiers and the CSS Selectors as Fragment Identifiers Community Group.
The two approaches have different failure modes. Yours needs more infrastructure, but certainly seems less likely to reach porn sites by accident.
Yeah, fragments have so much undelivered goodness :) We use CSS fragments too at Superfeedr to enable 'subscriptions' to content inside an HTML page: http://documentation.superfeedr.com/subscribers.html#htmlfragments
Google "project Xanadu" - they crashed on the rocks of this exact linking problem.
I wrote about Xanadu 10 years ago. Their problem was more about trying to do it all with transclusion and payment.
This is very similar to Gervase Markham's fragment search: http://blog.gerv.net/2007/02/fragment_search/
He proposes using #!s![search term] and allows #!s[number]![search term] to find the n'th match on a page.
He provides a greasemonkey script that works in many browsers. He also proposes using #![other letter] for other purposes.
Created a quick WordPress plugin that uses Jonathan Neal's script:
https://github.com/goblindegook/Fragmentions/
(Will appear on the WordPress plugin repository shortly.)
Hi Kevin,
I really like the fragmentions concept, and it looks very useful for an issue we're trying to solve right now on our (very large) Drupal site which is in development, so I turned Jonathan's script into a Drupal module.
It's in "sandbox" mode at the moment, but can be downloaded through the module info page below if people would like to try it (it does work! :-):
https://drupal.org/sandbox/ocean/2247743
Cheers,
Drew Robinson
I think this is a very exciting enhancement to linking on the web, although there appears to be some conflict/bleed over??? with single hash # anchor links. I gave it a test drive on one of our sites and posted some of my observations on the WP Fragmention support forum.
Post a Comment