Fragmentions - linking to any text

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:

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.

the search link is more resilient than linking to Mark Pilgrim's deleted post about it, which I linked to in 2011.

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:

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 we can just escape spaces in the fragment using words that identify the text, as id's cant have spaces in. For example:

http://epeus.blogspot.com/2003_02_01_archive.html#annotate%20the%20web

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.

A follow-up post.

also published on my blog also published on Medium

webmentions

Nice one Kevin! Unfortunately the cost of performing a DOM keyword search is pretty darn low and the challenge of getting the standards to change is a bit more difficult.
This is something Wikipedia should definitely implemente.
This is one of those tools that you really like once you have it.
@kevinbae @zeynep @jeffsonstein fragmention support is in instapaper already, and there's a chrome extension:...
@kevinbae @zeynep @jeffsonstein fragmention support is in instapaper already, and there's a chrome extension: chrome.google.com/webstore/detai…
@yatil Awesome!
Unknown
@kevinmarks Think of conceptual difference between page & post in WP and that’s what I’m thinking. But good forum is more important.
@Suw in wp the pages are linked at the top level by default, not scrolling past in time - is that key?
@Suw @kevinmarks In my experience, the conceptual difference in WP between posts and pages is that pages aren't... aaron.pk/r4ZR1
Giovanni P <[email protected]>
www.kevinmarks.com/fragmentions.html
There seems to be happening a conversation at the webmention section here, but in fact it is quite nonsensical. (Also, the fragmentions aren't working in this same page)
@kevinmarks Circling back to podcasts: the conversation I’ve been hearing and reading lately is that podcasts are a commitment.
@kevinmarks Ideas in podcasts tend to not go viral until written in another form. Podcasts episodes or series *do* go viral, however.
@kevinmarks So how does one expose a podcast, especially “casual” unscripted ones in a way that allow listeners to spread ideas
@kevinmarks from them, without requiring every podcast be transcribed, which (even with Mech Turk solutions or whatever) is too expensive?
@kevinmarks Referencing is part of the problem, and thank you for explaining all the solved portions of that!
@GlennF right, but the resistance to chapter lists comes from the podcasters too because it enables ad skipping.
@kevinmarks Chapter lists ≠ fragment references though, I don’t think, though I see your point. *Also* great deal of current
@kevinmarks incompatibility in chapter support, according to @imyke and others.
@GlennF if each subtopic in a discursive podcast had chapter markers you could cite a piece more easily than a time reference
Bummed about #LogJam [testing: #fragmentions #indieweb]
Bummed about #LogJam [testing: #fragmentions #indieweb] 2 min read This Known site runs on Raspbian OS on a Raspberry Pi. It's a great platform to test and learn on but there are a few disadvantages; recently a security vulnerability has made one of those an issue. LogJam is a *downgrade attack* which attempts to trick browsers into downgrading to a 512-bit DHE_EXPORT Cipher: weakdh.org The Logjam attack allows a man-in-the-middle attacker to downgrade vulnerable TLS connections to 512-bit export-grade cryp
@kevinmarks @jden415 Very interesting, and you've obviously put a lot of thought into this over the years. Will need to consider a bit.
@jongalloway @jden415 the epiphany was realising that searches are more resilient than links, and refocusing that on a page.
@kevinmarks @jden415 All true. A part of me still wants to cling to a semantic web (lowercase s), but you're right, search is timeless.
@jongalloway @jden415 I think fragmentions do qualify as that, as they add resilience to the web by making links more robust to site deaths
@jongalloway @jden415 NB @t and I introduced 'lowercase semantic web' in 2004 tantek.com/presentations/… google.com/?q=%22lowercas…
@kevinmarks @timoni @fugueish Don't expect to see intertwingling in @ChicagoManual soon. Maybe after we kill closed-access publishing...
@Callionica @drdrang indeed, also see kevinmarks.com/mentionquote.h…
Unknown
@MrDys Sounds maybe like you're looking for http://www.kevinmarks.com/fragmentions.html or thereabouts?
I have now implemented Fragmentions as described by Kevin Marks’ post here : http://www.kevinmarks.com/fragmentions.html I have done this by using the WordPress plugin WP Fragmention as can be found here : http://wordpress.org/plugins/wp-fragmention/ This…
Boffo Socko Now Supports Hypothes.is Annotations
I’d played around with many of them in the past, but a recent conversation with Matt Gross about News Genius and their issues in the last week reminded me about internet annotation platforms. Since some of what I write here is academic in nature, I thought I would add native Hypothes.is Annotation support to the site. If you haven’t heard about it before, you might find the ability to highlight and annotate web pages very useful. Hypothesis allows for public or private highlights and notes and it can be a v
@KevinMarks FYI, the time posts on your webmentions appear to be off by 7 hours. See also my last comment on: http://www.kevinmarks.com/fragmentions.html
IndiewebPress: Improving Comments
This is the one of a series of brainstorming posts I am putting out about how major functional Core changes to WordPress could result in an improved experience for those interested in pursuing Indieweb philosophies in WordPress. Comments in WordPress were originally thought of as a way for visitors to a site to have discussions on the site. I’m going to refer to the traditional comment idea as ‘local comments‘. This is where someone fills out a comment form on a post, which adds a comment to the page, eithe
IndiewebPress: Connecting Your Site and Mine
This is the one of a series of brainstorming posts I am putting out about how major functional Core changes to WordPress could result in an improved experience for those interested in pursuing Indieweb philosophies in WordPress. This builds on a previous article about improving comments. In the previous article, I discussed my thoughts on the subject of comments as a structure and what comments could be capable of if that structure was improved. But, when I showed that to several people, the comment was, q
Unknown
Fragmentions
In reply to:http://www.kevinmarks.com/fragmentions.htmlHave you ever got tired of having to find the a heading’s id (view site source using Ctrl + U) so that you can send someone a link like https://example.com/#foo?1And then becoming even more frustrated when you find that the heading that you want to link does not even have an id attribute!?And then in the end you resort to just telling them “Go to that page, and search for `foo’“? —Today I came across this wonderful Javascript utility script called fragm
Unknown
Fragmentions
In reply to:http://www.kevinmarks.com/fragmentions.htmlHave you ever got tired of having to find the a heading’s id (view site source using Ctrl + U) so that you can send someone a link like https://example.com/#foo?1And then becoming even more frustrated when you find that the heading that you want to link does not even have an id attribute!?And then in the end you resort to just telling them “Go to that page, and search for `foo’“? —Today I came across this wonderful Javascript utility script called fragm
Unknown
Homebrew Website Club Teesside 2018-08-07
Kevin Marks: I haven't done much with my own site recently - I still have a hosted notes site at known.kevinmarks.com and haven't taken on moving it to somehting I control thinking about the problem of link decay - as Tim Berners-Lee said, "eventually every URL ends up as a porn site". http://www.kevinmarks.com/fragmentions.html even the venerable http://gmpg.org/ has got flaky, though Zegnat has been reconstructing it from archive.org https://zegnat.github.io/html-gmpgdotorg/ @baekdal looked into the link
I just added this chrome extension http://goo.gl/q5IwrD so I can take advantage of fragmentions.  Read more here.. http://goo.gl/FN3irO I heard about this on TWIG (This week in Google).
Fragmentions - linking to any text: This is a crazy simple and awesome idea! "#Fragmentions - linking to any text" - via @kevinmarks #web
On a essayé il y a déjà 20 ans à l’IETF : zesty.ca/crit/draft-yee… C’est revenu chez IndieWeb il y a 5 ans : kevinmarks.com/fragmentions.h… indieweb.org/fragmention Et il y aura quelque chose dans le prochain Chrome : github.com/bokand/ScrollT… Bref, ça prend le temps, mais ça arrive… 😉
#indieweb @kevinmarks: even the venerable gmpg.org has got flaky, though Zegnat has been reconstructing it from archive.org zegnat.github.io/html-gmpgdotor…
#indieweb @kevinmarks: @baekdal looked into the link decay problem for his own site and found a lot of missing links, but he also built an interstitial to redirect ot archive.org baekdal.com/trends/publish…
#indieweb @kevinmarks: this suggests that good practice would be to always ping archive.org to stash pages when you link to them. This is something I do at mention.tech when sending webmentions - I archive both the links involved too.
#indieweb @kevinmarks: But maybe we could do more - store a hash of the page as we saw it, and compare that with what is seen when viewed? Use the original link by default, switch to archive when we know it is bad, or after 3 months?
#indieweb @kevinmarks: for the GMPG case, there's an issue here: github.com/Zegnat/html-gm…
#indieweb @kevinmarks: trying out owning my own locations - it's really not much code to to do maps these days kevinmarks.github.io/maptime/ (inspiration form @AndrewJohnMarks and @ChristophaMarks
How did you get the water color map?
It's Stamen's Open Terrain project stamen.com/work/open-terr… you can pick from different map tiles for leaflet here: leaflet-extras.github.io/leaflet-provid… The code is simple : github.com/kevinmarks/map…
Unknown
@KevinMarks oh nice I like “fragmentation” too but it seems like maybe that indieweb page should be updated?