Properly invalidate browser cache after updating from new UI
There's a fairly steady trickle of reports from the forums (and my personal experience) that the new GUI ends up not working after an update, because it was using some stuff from the browser cache instead of downloading the new version from the server.
This behavior is particularly nasty because the GUI generally looks correct. Symptoms typically involve non-functional UI elements like buttons, so users tend to flail around a bit (I speak from experience) until they either figure it out on their own or are told to clear the browser cache.
#5 Updated by Anonymous almost 3 years ago
- Target version changed from 11.2-U2 to 11.2-U3
We have some ideas on how to do this, either have a datestamp or some kind of incrementing file somewhere in the repo that tells the browser that the UI has been updated however hashing out the implementation details and testing this will take quite a bit of time, given how close this is to code freeze we are going to push this to U3 so we can make sure we do this right the first time.
#6 Updated by Damian Szidiropulosz almost 3 years ago
PR 2013 Fixes this by adding a platforminfo constant to the top level component. This allows the UI to check the version number against the version stored in localstorage before authentication happens. If there is version stored in the file and it doesn't match the constant we assume that the user just upgraded. The fix works well but hard codes the version into the file. Considering we also have a nightly this is not a maintainable solution. For this to maintainable we would like the automated build process to update the version with each build.
#7 Updated by Dru Lavigne almost 3 years ago
master: https://github.com/freenas/webui/pull/2018 and https://github.com/freenas/webui/pull/2020 and https://github.com/freenas/webui/pull/2013
11.2-stable: https://github.com/freenas/webui/pull/2019 and https://github.com/freenas/webui/pull/2021 and https://github.com/freenas/webui/pull/1604 and https://github.com/freenas/webui/pull/1734
#9 Updated by Anonymous almost 3 years ago
Testing criteria: when switching from one version to another (i.e. updating) the browser should do a quick refresh on the login page. This should not break TrueView's post authentication method, the refresh should still happen if the version of the UI that was cached was out of date and the middleware token should still login.
#14 Updated by Zackary Welch over 2 years ago
- Status changed from Passed Testing to Failed Testing
Initially I passed this since I didn't have any problems after updating, but I found an issue when switching between boot environments. I went from Internal95 to Internal97 and FreeNAS did not refresh on the login page, making the UI look all messed up. Refreshing fixed it. Seems this might not be fully functional. If this instance is not related to this ticket, then otherwise it passes.
#16 Updated by Zackary Welch over 2 years ago
- Status changed from Failed Testing to Passed Testing
- Needs QA changed from Yes to No
Unable to reproduce. Erin also tested this and couldn't reproduce, so I'm going to mark this as passed; if this happens again, I reckon a ticket will be created at some point.