I am working on a live, large AngularJS web application which has feature updates and hotfixes. We currently use gulp to build/minify/uglify our files as well as gulp-rev to add versioning to these files to assure our users have the latest files. This seems to work well, except when I go to our production site to make sure the change was made, I have to refresh the page before Chrome downloads/uses the correct files.
My question is, is this what’s expected to happen? Is there no way for Chrome to know to download the newest file without needing a refresh?
For more details, our current workflow is the following:
- Make the changes
- Run gulp build
- combine all our js files into a single app-random-hash.js
- combine all our css files into a single app-random-hash.css
- Copy the files into /var/www/
- Delete old, stale files
- I visit the website and still have the old app.js file until i refresh the page, at which point i get the newest .js file
Source: AngularJS
from Angular Questions https://angularquestions.com/2017/10/05/auto-versioned-files-still-requires-refresh/
via @lzomedia #developer #freelance #web #lzomedia.com
No comments:
Post a Comment