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,
- For a cached resource with
max-age
set, in the second request for the same resource, why is there aResponse
shown in the profiler? Technically there shouldn't be aResponse
right? Is it from theresource cache
? Assuming that it is a pseudo response from the clients caching mechanism, should thatResponse
have aCache-Control
header or not (remember the first request already informed that)? - If the a client sends a
no-cache
in the request and it gets a response withmax-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 usingno-cache
andmax-age
together - is that possible? Sometimes I have seen that caching works even without thePlease see What happens if you don't set cache-control header?Cache-Control: private,max-age=86400
header. However, in this scenario, I see that there was aEtag
in the previous response and client sends it back inIf-None-Match
in the next request and the HTTP response is304
. Is that normal?- Last but not least, in
IE 11
'sDeveloper Tools
, why do we see304 (not modified)
instead of200 (disk cache)
for a cached resource? We are doing a right clickRefresh
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.