问题
I want to invalidate cached app.js after every single release.
Short question:
Is it necessary to physically rename(by gulp-rev, for example) app.js
to app-a23ds.js
every time or is enough to add param with hash in html like app.js?_=<build number>
Description:
I was sure before that is enought to write something like app.js?_=<build number>
in index.html to load new file instead of cahed. But when I'm investigate this question deeper I found a few of huge solutions for this case. Like gulp-rev. The main idea of them is to write a new file with new filename (old filename + revisions hash). Is it really neccessary or what?
来源:https://stackoverflow.com/questions/27914767/is-it-necessary-to-rename-js-files-to-invalidate-cache