1

As far as I understand, when a request is made for the very first time, the browser will download the resource from the server.

If the Cache-Control: private,max-age=value header is present, then it can cache it for value seconds.

This much is clear.

However,

  1. For a cached resource with max-age set, in the second request for the same resource, why is there a Response shown in the profiler? Technically there shouldn't be a Response right? Is it from the resource cache? Assuming that it is a pseudo response from the clients caching mechanism, should that Response have a Cache-Control header or not (remember the first request already informed that)?
  2. If the a client sends a no-cache in the request and it gets a response with max-age, how does that work for the next request? Will it do a round-trip to check if the content has not changed? How about server using no-cache and max-age together - is that possible?
  3. Sometimes I have seen that caching works even without the Cache-Control: private,max-age=86400 header. However, in this scenario, I see that there was a Etag in the previous response and client sends it back in If-None-Match in the next request and the HTTP response is 304. Is that normal? Please see What happens if you don't set cache-control header?
  4. Last but not least, in IE 11's Developer Tools, why do we see 304 (not modified) instead of 200 (disk cache) for a cached resource? We are doing a right click Refresh or F5 to test what is happening. In a normal scenario, does IE takes the content from the disk cache just like all other browsers?

I am trying to troubleshoot a cache issue in IE 11 where despite the Cache-Control: private,max-age=86400 in the Response Header, the content is still downloaded from the server. There is a Cache-Control: no-cache in the Request Header though.

It happens when we browse normally as well as with the F12 Developer Tools.

Our Network Topology is something like Client <-> F5 <-> App Server.

I am also reading the HTTP Caching article in Google Developers but things are not so clear.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.