working on a website built with python and angular but after every single change I need to hard reset browser to see it. I see this is a problem in general so what's the best approach for caching js and css resources ? right now I dont care if each file will be called on every single page if there is no other option.
Asked
Active
Viewed 131 times
0
-
Possible duplicate of [How to force browser to reload cached CSS/JS files?](http://stackoverflow.com/questions/118884/how-to-force-browser-to-reload-cached-css-js-files) – Leonid Vasilev Apr 20 '17 at 16:30
2 Answers
1
Are you referring to development time? If so, this can often be set in the browser. Which browser are you using? For Chrome:
- Open the developer tools.
- Select the network tab.
- Check the
Disable cache
checkbox

DeborahK
- 57,520
- 12
- 104
- 129
-
-
That is why I was asking whether you were referring to development time. You didn't mention testers in your post. – DeborahK Apr 20 '17 at 17:12
1
For testing/deployment, consider building the files with a unique number attached to them so that the browser sees them as new files.
The easiest way to perform these builds is to use the angular CLI build process: github.com/angular/angular-cli/wiki/build.
The screenshot below is from John Papa's excellent Angular CLI
course on Pluralsight.

DeborahK
- 57,520
- 12
- 104
- 129