<?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/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx</link><description>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 fresh) response may be returned for a subsequent request, based on whether or not the new</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10381035</link><pubDate>Thu, 27 Dec 2012 21:54:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10381035</guid><dc:creator>EricLaw [ex-MSFT]</dc:creator><description>&lt;p&gt;In particular, it should be noted that, in virtually all cases I can think of, it would be preferable for the client to retrieve a locally cached albeit decompressed response in preference to a remote retrieval of a compressed version of the resource.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10381035" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10381032</link><pubDate>Thu, 27 Dec 2012 21:48:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10381032</guid><dc:creator>EricLaw [ex-MSFT]</dc:creator><description>&lt;p&gt;@Mark: No one at Microsoft updates IE6-9&amp;#39;s functionality, if that&amp;#39;s what you&amp;#39;re asking; only security patches are issued. I&amp;#39;m afraid I don&amp;#39;t understand your claim of &amp;quot;intermediary cache thrash&amp;quot;-- it would be interesting to have a fuller explanation of the problem you think would arise. It would also be interesting for you to be more explicit about where, exactly in RFC2616 requires &amp;quot;Vary&amp;quot; as real-world practice suggests that it&amp;#39;s insufficiently plain.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10381032" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10362926</link><pubDate>Fri, 26 Oct 2012 05:28:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10362926</guid><dc:creator>Mark Nottingham</dc:creator><description>&lt;p&gt;Just a note - your &amp;quot;best practice&amp;quot;:&lt;/p&gt;
&lt;p&gt;&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;Only send a Vary: Accept-Encoding header when you have compressed the content (e.g. Content-Encoding: gzip).&lt;/p&gt;
&lt;p&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;Will make pretty much every intermediary cache thrash, and violates HTTP. Anybody left at MSFT who can fix this? ;)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10362926" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10273979</link><pubDate>Tue, 28 Feb 2012 18:19:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10273979</guid><dc:creator>Steve</dc:creator><description>&lt;p&gt;Eric, Is it fair to presume that in most cases... a web server that is serving up content with Expires and Cache-Control headers to explicitly cache static resources (CSS/JS/GIF/JPG/PNG) and not cache HTML pages should not need to send a Vary header... ever?&lt;/p&gt;
&lt;p&gt;e.g. if the server passes the correct headers for caching... can we ditch the Vary header completely?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;EricLaw: @Steve: The idea behind Vary is that the same URL may yield a different resource based on some factor in the headers. For instance, if I had a &amp;quot;Buy&amp;quot; PNG file, I could use VARY: Accept-Language and return a localized PNG file for a localized page. In practice, of course, sites will typically use a different URL for this purpose, because support for Vary is sporadic and causes cache bloat problems for shared caches.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10273979" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10096120</link><pubDate>Wed, 24 Nov 2010 15:39:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10096120</guid><dc:creator>Vincent Voyer</dc:creator><description>&lt;p&gt;Just found out that the second server is sending Vary: host while in HTTP 1.0, I guess this is why IE6 can still send if modified since.. :)&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="https://gist.github.com/713829"&gt;https://gist.github.com/713829&lt;/a&gt; for headers&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10096120" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10096023</link><pubDate>Wed, 24 Nov 2010 13:24:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10096023</guid><dc:creator>EricLaw [ex-MSFT]</dc:creator><description>&lt;p&gt;@Vincent: I suspect you&amp;#39;re seeing this behavior because perhaps your response is compressed. As noted, IE6 entirely ignores Vary if compression is used. That&amp;#39;s the only explanation I see. (I-M-S and If-None-Match will be sent for an expired cached response, or in IE7+ if a response requires validation due to Vary).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10096023" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10095842</link><pubDate>Wed, 24 Nov 2010 09:46:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10095842</guid><dc:creator>Vincent Voyer</dc:creator><description>&lt;p&gt;I have request being cached even if vary host is set.&lt;/p&gt;
&lt;p&gt;IE6 will send &amp;quot;if modified since&amp;quot; even if vary host is set, is this because I also have cache control max age public set ? Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10095842" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10045210</link><pubDate>Tue, 03 Aug 2010 01:14:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10045210</guid><dc:creator>EricLaw [MSFT]</dc:creator><description>&lt;p&gt;@Dan: Yes, Cache-Control: private tells a (shared) proxy not to cache the resource. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just because the client requests GZIP&amp;#39;d content doesn&amp;#39;t mean that the server must give it back (for instance, many sites send the first response without compression and spin up a background thread to compress the content and cache it on the server for later use). Additionally, just because IE supports compressed content doesn&amp;#39;t mean that it will always ask for it-- users can disable compression, or edge proxies may strip the client request&amp;#39;s Accept-Encoding header.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10045210" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10044629</link><pubDate>Sun, 01 Aug 2010 04:48:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10044629</guid><dc:creator>Dan Zollman</dc:creator><description>&lt;p&gt;I&amp;#39;ve got a question as someone who&amp;#39;s still learning how HTTP caching works. Let&amp;#39;s say a resource is set up as follows:&lt;/p&gt;
&lt;p&gt;- Normally, send &amp;quot;Vary: Accept-Encoding, User-agent&amp;quot;&lt;/p&gt;
&lt;p&gt;- If client is IE8 or earlier, and if content is not compressed, don&amp;#39;t send the vary header, but send &amp;quot;Cache-Control: private&amp;quot;&lt;/p&gt;
&lt;p&gt;Wouldn&amp;#39;t that prevent proxies from storing the uncompressed version?&lt;/p&gt;
&lt;p&gt;And, a separate question: if we&amp;#39;re talking about a gzipped page, and if IE supports gzip anyway, why would uncompressed content be sent to IE (with the Vary header) in the first place?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10044629" width="1" height="1"&gt;</description></item><item><title>re: Vary with Care </title><link>http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx#10019129</link><pubDate>Wed, 02 Jun 2010 21:18:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10019129</guid><dc:creator>EricLaw [ex-MSFT]</dc:creator><description>&lt;p&gt;I&amp;#39;ve updated this post with updated analysis of IE6 behavior after code inspection. A future update to this post will cover IE8 and IE9 behavior.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10019129" width="1" height="1"&gt;</description></item></channel></rss>