How can I make the browser see CSS and Javascript changes?

后端 未结 5 1181
迷失自我
迷失自我 2020-12-09 01:12

CSS and Javascript files don\'t change very often, so I want them to be cached by the web browser. But I also want the web browser to see changes made to these files without

5条回答
  •  清歌不尽
    2020-12-09 01:48

    In my opinion, it is better to make the version number part of the file itself e.g. myscript.1.2.3.js. You can set your webserver to cache this file forever, and just add a new js file when you have a new version.

提交回复
热议问题