Chrome doesn't cache images/js/css

后端 未结 6 1855
旧时难觅i
旧时难觅i 2020-11-27 03:23

When Chrome loads my website, it checks the server for updated versions of files before it shows them. (Images/Javascript/CSS) It gets a 304 from the server because I never

6条回答
  •  星月不相逢
    2020-11-27 03:33

    If you want Chrome to cache your JS/CSS files - the server will need to set a "Cache-Control" header. It should look like:

    Cache-Control:max-age=86400 (if you want to cache resources for a day).

提交回复
热议问题