Good HTTP citizenship for DiggBar protesters

Saturday, 11 Apr 2009 [Thursday, 16 Apr 2009]

John Gruber started a bit of a wave by blocking the DiggBar on his site and explaining how others can do the same.

However, his implementation as it currently stands does not play well with search engines and caching proxies.

Update: Adrian Sutton:

So that’s roughly what has now been deployed to Symphonious.net. The key difference is that the “Vary: Referer” header that Aristotle suggests is only added when the page is blocked. This means it’s possible for someone using the DiggBar to get the real page from a caching proxy, but it shouldn’t be possible for an innocent user to get the blocked page.

That’s a clever trade-off. He compounds this with a Javascript solution to bust the DiggBar frame, because a user might be coming in through a link from another site that in turn has been framed – which isn’t obvious from the referrer. Nice work.

Update: Mark Nottingham remarks that serving responses both with and without a Vary header for the same URI is likely to confuse caches.