Chrome doesn't cache images/js/css Chrome doesn't cache images/js/css google-chrome google-chrome

Chrome doesn't cache images/js/css


Make sure you have the disable cache checkbox unchecked/disabled in the Developer Tools.


What do your request headers look like?

Chrome will set max-age:0 on the request's Cache-Control header if you press Enter in the location bar. If you visit your page using a hyperlink, it should use the cache, as expected.


Wow! I was facing the same issue for quite some time.

I'll tell you why you were facing this issue. Your headers are just fine. You receive a 304 because of the way you are trying to refresh the page. There a mainly 3 ways -

  1. Press enter in the address box. You will observe chrome reads the file from the cache first and does not go to the server at all.

  2. Press f5, this would verify if the file has become stale (probably that is how you are refreshing)

  3. Press Ctrl+f5, this is unconditional reload of all static resources.

So basically - you should press the return key in the address bar. Let me know if this works.