Chris's Wiki :: blog/web/XHTMLMasochism Commentshttps://utcc.utoronto.ca/~cks/space/blog/web/XHTMLMasochism?atomcommentsDWiki2008-12-16T10:24:49ZRecent comments in Chris's Wiki :: blog/web/XHTMLMasochism.From 87.79.236.202 on /blog/web/XHTMLMasochismtag:CSpace:blog/web/XHTMLMasochism:d8157abaf6214194abf2016fd9af9820a3bc99b9From 87.79.236.202<div class="wikitext"><p>You don't need to mark your pages truly non-cachable, but for all intents and purposes the result will be the same. Specifically, you need to send <code>Vary: User-Agent</code> or <code>Vary: Accept</code> (or the combination) in your headers. Due to the huge variations of user agent strings, the former is a tacit statement of non-cacheability, whereas the latter fares a lot better. <a href="http://tech.groups.yahoo.com/group/rest-discuss/message/10952">Eric Bowman described an insanely clever hack on rest-discuss</a> – he uses <code>Vary: Cookie</code> to be able to set a server-controlled cache key.</p>
<p>But note that the only <code>Vary</code> value that Internet Explorer assigns meaning to is <code>User-Agent</code>, which it will treat as absent, since the browser itself always sends the same user agent string. For all other values, IE will behave as for <code>Vary: *</code> and re-request the page on every access.</p>
<p>—<a href="http://plasmasturm.org/">Aristotle Pagaltzis</a></p>
</div>2008-12-16T10:24:49Z