Mon, 04 Feb 08

Sending trackbacks to the sites that you bookmark in del.icio.us

I know they have their problems (I had 26 good and 38428 spam when they were enabled on my site) but I’ve always liked the idea of trackbacks (and the pingback alternative).

A few months back I started thinking about sending trackbacks when bookmarking pages in del.icio.us. Having been told that, although it was something that had been considered, it wasn’t likely to be added anytime soon I decided to take a look at adding the functionality myself.

The trackback specification states that I must send the permalink of my ‘post’ to the resource that I’m tracking back to. By design, individual posts (or bookmarks) in del.icio.us aren’t addressable by a URI. So, the first step was to add permalinks to my del.icio.us bookmarks. This was a kludgy, manual fix that added permalinks to all my old bookmarks: it didn’t work for any new bookmarks.

From here, I spent some time hacking around with the del.icio.us firefox extension to get it to automatically generate these permalink tags.

The final stage was to extract the hacked-in functionality into its own extension (an extension of an extension – cool huh).

Somehow, it took until about a month ago for me to realise that I now had everything in place to actually add trackback support to the del.icio.us firefox extension. I started looking at it last week and I’ve just finish up the proof of concept this morning. At present, it scans the page you’re bookmarking looking for an anchor tag with rel=trackback (because this is easier than trying to parse the RDF). If it finds one then it uses the url-tag from the del.icio.us permalinks extension to construct the permalink for your (to-be-created) bookmark and promptly goes off to send a trackback.

The code is over in my google code repository. It’s very rough around the edges so I’m holding off providing a compiled version just yet. If you really want to play along then you can follow these steps:

Oh, and I’ve created a real simple trackback server (well, a mongrel handler) and a dummy page that includes a link to this server so that you can see the trackbacks being sent.