Our company downloads the project from SVN to the local, and then uploads it to the server after modifying it locally.
The current problem is that when several styles are modified locally, or externally linked js is previewed in the browser, the changes cannot be seen due to caching, and the cache can only be manually cleared. However, it is more troublesome when modifications are frequent. After looking at the method of adding timestamps to fis, it seems that the project is only reconfigured when deploying or updating. Is there any good method for this kind of local modification?
Disable cache through chrome
chrome dev tools > networks > disalbed cache, see the picture below
Add version number after css and js files
You can use Chrome’s clean cache plug-in. Just click the button of this plug-in every time you refresh the page. You don’t need Chrome’s refresh button
It is recommended to use a build tool such as webpack or gulp. When building the project, put the version number after the file to trigger the browser request.
Develop and deploy front-end code
After each modification, you can add a timestamp after the file to ensure that the requested file is a newly modified file, like the following
<link rel="stylesheet" href="css/main.css?i=2017051101">
<script src="js/config.js?i=2017051101"></script>
The button on the page can be forced to refresh
Button binding event location.reload()
CMD + SHIFT + R