Mobile app version of vmapp.org
Login or Join
Speyer207

: Can a content be cached even if the max-age header is not set and vice versa? As far as I understand, when a request is made for the very first time, the browser will download the resource

@Speyer207

Posted in: #Cache #Http

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 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)?
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?
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?
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.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme