Chrome does not cache js & css, but caches images

Recently, I began to notice that my JS and CSS files are not cached in chrome and always reload from the server.

But images and fonts are loaded from the cache.

Below is the server response for the javascript file. Has something changed in chrome behavior? This does not happen in FF or IE!

Please, help!

HTTP/1.1 200 OK
Accept-Ranges: bytes
ETag: "282766-1400285984000"
Date: Wed, 18 Nov 2015 18:27:05 GMT
Cache-Control: public, max-age=31536000
Last-Modified: Sat, 17 May 2014 00:19:44 GMT
Content-Type: application/javascript
Vary: Accept-Encoding
Content-Encoding: gzip
Connection: keep-alive
Transfer-Encoding: chunked
+4
source share
2 answers

mac chrome: 54.0.2840.87 (64- ) , javascript , , , (.. https /localhost, self )

+2

( javascript):

Cache-Control: public, max-age=31536000
  • 365 = 31 536 000
  • 1 = 2,629,743
  • 1 = 604 800
  • 1 = 86 400

Chrome -, . ( .)

, , , ...

0

Source: https://habr.com/ru/post/1616418/


All Articles