A wee tweak to my feed links

As I said the other day, I’m quite happy with Morten’s Syndication Subscription Service as a solution to all sorts of “what should clicking on a link to an RSS feed do?” problems: if you have an aggregator (that behaves itself decently), then you can set a cookie and it turns into one-click subscription, if you don’t have an aggregator then you don’t come face to face with fairly raw XML, or an “Open or Save” prompt, or worst of all a “feed: is not a registered protocol” alert. But there was one way it wasn’t quite satisfying.

The reason we have actual links to raw XML that we don’t ever expect anyone to look at (unless we’ve asked them to fix what we’ve broken) is because sometimes dealing with a link in all the normal link ways short of clicking it is just what someone wants: dragging it to another application, or right-clicking to copy the link location, is quite often the quickest and simplest way to subscribe. Generally, the autodiscovery in the SynSubServ pages makes copying a link to them work just about as well as the direct link to the feed a person might have expected they were copying, but sometimes it doesn’t (in at least one case, I saw someone advertising the SynSubServ link as being my feed link, in their blogroll).

But, one of the nice things about hanging around on the fringes of the Mozilla project is that you get a rather different attitude toward JavaScript than the one you’re likely to pick up hanging around web standardistas. After all, we build a good share of our browser in JavaScript, especially the parts you can touch and tweak, and while I don’t ever have any interaction with him, JavaScript’s daddy is always around. And with that attitude, it’s obvious what to do:

<a href="http://philringnalda.com/index.xml" onclick="location.href='http://purl.org/net/syndication/subscribe/?rss=' + this.href; return false;" rel="nofollow">

Copy it or drag it, it’s a link. Click it the way the average user will, with JavaScript enabled, and it gives you at least some idea what you ought to do with it, without being too baffling. Click it with JavaScript disabled, and you get what you deserve. Consider following it if you are a search engine which won’t understand it, but will still pretend to know when it is and isn’t a useful result, and you’ll be gently shooed away.

4 Comments

Comment by Randy Charles Morin #
2005-01-26 09:20:50

Phil,
I don’t really see how this helps. It’s highly unlikely that blog hosting services are gonna deploy a vendor specific subscription service.

Comment by Phil Ringnalda #
2005-01-26 21:18:45