Below are the request and response headers for a page in my web application:
GET http://my-server/myapp/mypage.aspx?myid=123 HTTP/1.1 Accept: */* Accept-Language: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) UA-CPU: AMD64 Accept-Encoding: gzip, deflate Host: my-server Connection: Keep-Alive Pragma: no-cache Cookie: <sanitized>
HTTP/1.1 200 OK Cache-Control: private Content-Length: 173788 Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.5 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Date: Thu, 15 Jul 2010 17:48:25 GMT
IE8 and Firefox seem to ignore cached copies of this page. Both browsers send the same unconditional requests every time I load the page. I have verified that IE8 does at least cache the response in the "Temporary Internet Files" directory.
From what I understand,
Cache-Control: private should instruct both browsers to cache the response. Since there is no expiration info, they should send conditional requests to validate the cached copy for later requests, but this isn't happening. Is there some browser-level heuristic rejecting the cached copy (or preventing caching at all)? Or is my understanding of the headers simply wrong?
The web server involved is IIS 7.5 running on Windows 7 Enterprise. The browsers are IE 8 and Firefox 3.6.6, running as administrator on the same machine as IIS (the requests are made to the machine's host name, not localhost).
Interestingly, IE9 Platform Preview 3 doesn't even send a conditional request - it blindly reuses the cached copy!