DDDDDD
DDDDDD

Reputation: 61

Reasons why Google Chrome is ignoring Cache-Control header

I have a specific asset on my server that responds requests with the following header:

cache-control:public,max-age=2592000,immutable

Sometimes the site might have to request the same file more than 10 times (The reason is not important). That's the reason why I configured this header.

Almost all mobile devices, desktop, and tables (along with the browsers) respect it, but some are not, they are just ignoring and requesting from the server again, E-V-E-R-Y single time. I'm using the BrowserStack to test, maybe the problem could be there, I'm not sure of anything now. Have you ever experienced such a thing? Is there a workaround, or something that I could do to debug it?

Thank you.

Upvotes: 2

Views: 2120

Answers (1)

Bence Szalai
Bence Szalai

Reputation: 912

immutable is an Extension Cache-Control directive and is not supported by all browsers.

According to http://developer.mozilla.org :

Extension Cache-Control directives are not part of the core HTTP caching standards document.

If you check on the same page you can see that Chrome does not support it.

You may be better off using a simpler directive, like:

Cache-Control: public, max-age=31536000

Upvotes: 2

Related Questions