-
-
Notifications
You must be signed in to change notification settings - Fork 562
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 busting variable to Pi-hole js/css #1550
Conversation
This was supposed to have been sorted with some changes to the Is it worth, in your opinion, adding this same variable to all other calls to |
Certainly could, I only focused on the ones that appear to be causing the most issues with updates. There could be a risk of falling in to a trap of where to stop - images for instance could even be included. Maybe for this PR I could include all CSS and JS in |
Yeah, I see what you mean. Any one of the scripts could change between releases (vendor scripts less likely, but still possible), but for instance this one was changed. |
Maybe any that match |
I don't see why it didn't work... Regardless, cache busting is a good idea. That way we can increase
|
(p.s. sorry about pull request mess, not used to using sign off) |
@tjeffree please could you rebase on devel? We forgot to update devel from master after we did the last release, which is done now! Sorry. And don't worry about the commit mess, you should see some of my PRs.... 🙄 |
Signed-off-by: Tony <[email protected]>
Signed-off-by: Tony Jeffree <[email protected]>
Signed-off-by: Tony Jeffree <[email protected]>
@PromoFaux Ok, I think that's done! |
Thanks, will try to find the time to fully review later |
Signed-off-by: Tony Jeffree <[email protected]>
I wasn't planning on adding vendor scripts as part of the cache busting. I'm not sure how vendor files are added to the project, would it be likely that they are replaced with the same names? I've always found it useful to add third party library files with version numbers included in the file name. I did miss one though, must have been after rebasing. |
It was only because I noticed you did the vendor links in the header, is all. Whilst we do have an |
I see, prefer if I just add it to all then? |
Yeah, might as well! They're less likely to change, but they do change from time to time |
Signed-off-by: Tony Jeffree <[email protected]>
All done! |
Signed-off-by: Tony Jeffree <[email protected]>
This is back up to date with the latest |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-core-web-v5-2-and-ftl-v5-3-released/40909/1 |
Add cache busting variable to Pi-hole js/css
By submitting this pull request, I confirm the following:
git rebase
)git commit --signoff
)What does this PR aim to accomplish?:
After every Pi-hole update there are a raft of messages from users who have broken dashboards due to old Javascript files being cached by browsers. This PR fixes the problem hopefully saving a lot of support work.
How does this PR accomplish the above?:
This PR adds a simple variable to the dashboard Javascript files based on a file creation time that will update along with the Pi-hole update. It also adds the same variable to Pi-hole css files in the header.
What documentation changes (if any) are needed to support this PR?:
None required.