-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New javascript/css files are not loaded because index.html is cached #2483
Comments
Recently experienced problems with outdated javascript code again in #2821 (comment) |
Is there a way to use the |
If Cache-Control is set to max-age=0, then etag will be used. |
If |
But It is fairly easy to reproduce.
Actual: Expected: |
Would this issue be solved by just removing the |
Some assets don't have cache busting hashes/timestamps, like the favicon. So setting |
Or at least only cache it a short while. Set caching to 1 minute. Should not increase server load much, since most page changes are with the javascript spa app and does not ask for index.html. This will ensure that the right version of the javascript file is loaded. Fixes woodpecker-ci#2483
It seems the etag is only set. It is never checked by the server when the browser sends |
indexHTML should not be cached with a long expiry.
index.html
references which version of the javascript and css files should be loaded.So when index.html is cached with a long max-age the browser will not notice when it is time to load new javascript/css.
woodpecker/server/web/web.go
Line 176 in 6d86ec7
Users need to reload the page to get the new js/css files. And even worse, if they do that while on /user for instance, the browser will only cache the new js/css files when you load woodpecker on /user next time. If you go to /repos or /, your browser will still have cached the old index file for those endpoints...
The text was updated successfully, but these errors were encountered: