-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add cache buster to images as well #81
Comments
FYI @jancborchardt, just experienced this when I migrated https://cloud.nextcloud.com/ |
I wonder if we can easily do this via some Javascript: Parse for all image links in |
Something like http://www.bennadel.com/blog/2643-cache-busting-css-images-with-less-css.htm would really help. Using http://lesscss.org/#client-side-usage we could also do this so that developers don't need any additional tools and do the compilation as packaging step. |
Assigning @jancborchardt, either cough cough somebody cough cough needs to add the version strings manually to all images in the CSS files and change them all the time we change an image… Or we switch to something like LessCSS that does this for free. |
I assume that might cause the browser to download the images twice. First, the HTML/CSS is parsed and the browser starts downloading files without any cache buster (the original URL). At some point the JS kicks in and modifies all core image URLs. As the browser might already download some images, those are downloaded a second time as the URL changed. |
We should also add cache busters to images such as our SVG files as well. For example by including
core/img/filetypes/folder-shared.svg?version=9.0.0
. Otherwise after an update still the old images are shown until the user manually clears their cache.The text was updated successfully, but these errors were encountered: