Good HTTP citizenship for DiggBar protesters

Saturday, Apr 11, 2009, 05:00 (updated Thursday, Apr 16, 2009, 16:30)

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.