-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix settings caching on some browsers #3508
Conversation
By adding a random string to the path of the js file every time, we make sure to never hit the browser cache.
By setting the response header "Cache-Control" to "no-store" and setting "Expires" to 0, we make sure the browsers and place calling this never store it in cache.
I would only approve the second even though we may never have exact control over browser caching on a particular Android/iOS/PC device. |
@Moustachauve can you revert HTML changes and only do backend change? |
Unless @softhack007 has a strong opinion, I will revert the HTML changes tonight. |
Fine for me 👍 |
This reverts commit 51dfa9a.
Revert for the html changes is done. |
Fix settings caching on some browsers
Some browser, especially Android webview, have more aggressive caching strategies and might sometimes cache the response of the settings JS.
This implements two strategy, one in the back-end and one in the front-end. Two might be overkill, so we could keep a single one if needed.
Front-end strategy to prevent caching
By adding a random string to the path of the js file every time, we make sure to never hit the browser cache.
Back-end strategy to prevent caching
By setting the response header "Cache-Control" to "no-store" and setting "Expires" to 0, we make sure the browsers and place calling this never store it in cache.