angular.js - Web application, single page application Cache question
習慣沉默
習慣沉默 2017-05-15 17:09:12
0
2
512

Does anyone know how to make the client go to the server to download the latest CSS and js after a website or web application is updated to a new version, instead of reading it from the cache?

After searching on my own, most suggestions are to add a version number in the middle or at the end of the CSS and JS file names, such as main.123456.min.css or main.min.css? version=123456.

If anyone has practical experience in this area, please enlighten me! Many thanks!

習慣沉默
習慣沉默

reply all(2)
迷茫

Use packaging tools such as webpack to automatically version assets for static resources.

为情所困

For example main.123456.min.css or main.min.css? version=123456

There is nothing wrong with this, I do it too. Caching is an optimization

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template