<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Vary with Care </title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx</link><description>This content was previously published elsewhere . I'm copying it here for broader visibility. About the Vary Response Header As described in the HTTP/1.1 specification ( RFC2616 ), the Vary response header allows a cache to determine if a cached (still</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Reflective Perspective - Chris Alcock  &amp;raquo; The Morning Brew #371</title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx#9773779</link><pubDate>Thu, 18 Jun 2009 10:23:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9773779</guid><dc:creator>Reflective Perspective - Chris Alcock  &amp;raquo; The Morning Brew #371</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blog.cwa.me.uk/2009/06/18/the-morning-brew-371/"&gt;http://blog.cwa.me.uk/2009/06/18/the-morning-brew-371/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>  Findings of June 22 - Jack is Here</title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx#9797232</link><pubDate>Mon, 22 Jun 2009 10:57:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9797232</guid><dc:creator>  Findings of June 22 - Jack is Here</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://jack-fx.com/interesting-links/4/findings-of-june-22"&gt;http://jack-fx.com/interesting-links/4/findings-of-june-22&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx#9843615</link><pubDate>Tue, 21 Jul 2009 21:17:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9843615</guid><dc:creator>Steve Clay</dc:creator><description>&lt;p&gt;In a response, Vary indicates content negotiation is occurring, so &amp;quot;Vary: Accept-Encoding&amp;quot; should be sent even when the non-encoded version is sent.&lt;/p&gt;
&lt;p&gt;If you don't, proxies may end up caching only the non-encoded version. &amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://wiki.squid-cache.org/KnowledgeBase/VaryNotCaching&amp;quot;&amp;gt;Squid"&gt;http://wiki.squid-cache.org/KnowledgeBase/VaryNotCaching&amp;quot;&amp;gt;Squid&lt;/a&gt; does this&amp;lt;/a&amp;gt;.&lt;/p&gt;
&lt;p&gt;What I haven't figured out is what to do about IE6 without the &amp;quot;SV1&amp;quot; in the UA. You can't reliably send gzipped JS to it, but if you leave off Vary and the request passes through a proxy, you've eliminated the ability of the cache to store the gzipped version.&lt;/p&gt;
</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx#9843636</link><pubDate>Tue, 21 Jul 2009 21:30:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9843636</guid><dc:creator>EricLaw [MSFT]</dc:creator><description>&lt;p&gt;@Steve Clay: From a protocol-perspective, of course you are correct. The point of this post is to explicitly state that using Vary: Accept-Encoding on uncompressed responses hurts performance in the most popular user-agents.&lt;/p&gt;
&lt;p&gt;Squid could work around their limitation in the most common case (e.g. don't blindly delete compressed, cached variants that are still fresh).&lt;/p&gt;
&lt;p&gt;An IE6 user who is current on patches should be able to properly decompress any response -- XPSP2 (identified by the SV1) shouldn't be required. In contrast, an IE6 user who is not current on patches has probably already been pwned by the bad guys.&lt;/p&gt;
</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx#9853318</link><pubDate>Thu, 30 Jul 2009 16:26:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9853318</guid><dc:creator>Benjamin</dc:creator><description>&lt;p&gt;You wrote : &amp;quot;unless the Vary header contains only the token User-Agent or Accept-Encoding.&amp;quot;&lt;/p&gt;
&lt;p&gt;And if the Vary header is:&lt;/p&gt;
&lt;p&gt;&amp;quot;Vary: Accept-Encoding,User-agent&amp;quot;&lt;/p&gt;
&lt;p&gt;does IE6 treat the response as uncacheable?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx#9908876</link><pubDate>Mon, 19 Oct 2009 01:50:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9908876</guid><dc:creator>Mark Nottingham</dc:creator><description>&lt;p&gt;Eric,&lt;/p&gt;
&lt;p&gt;I'm starting to think that IE6's behaviour is preferable to IE7's. &lt;/p&gt;
&lt;p&gt;Since it (presumably) controls the UA and AE headers, and doesn't allow their modification (using XHR, etc.), IE6 can safely strip Vary: UA and AE, and treat those responses as fresh. IE7, OTOH, forces revalidation on these responses.&lt;/p&gt;
&lt;p&gt;Why not combine the behaviours and force revalidation on anything with a Vary that's *not* AE or UA? That seems like the most performance and safest thing you can do without remembering request headers...&lt;/p&gt;
&lt;p&gt;Also, I don't think it's as easy as you say for Squid to correct their behavour; there's no simple way for them to differentiate between a server that doesn't set correct headers and one that has stopped supporting compression.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx#9909105</link><pubDate>Mon, 19 Oct 2009 15:05:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9909105</guid><dc:creator>EricLaw [MSFT]</dc:creator><description>&lt;p&gt;@Mark: IIRC, IE7 &amp;amp; IE8 also ignore the Vary: User-Agent directive. &lt;/p&gt;
&lt;p&gt;It's also important to recall that IE6 doesn't simply revalidate Vary'ing responses; it doesn't cache them at all.&lt;/p&gt;
</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx#9909753</link><pubDate>Tue, 20 Oct 2009 08:36:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9909753</guid><dc:creator>Mark Nottingham</dc:creator><description>&lt;p&gt;Hi Eric,&lt;/p&gt;
&lt;p&gt;Right, but IE6 will cache something that varies on AE or UA, right? Do 7 and 8 also ignore Vary: Accept-Encoding? If so, this isn't a big problem in the common(est) case...&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
</description></item></channel></rss>