-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
re-visit re-validating Web cache #2162
Comments
I reopened #2166. The web-ui errors and api errors co-exists and might have the same root cause. Please check. |
This issue is about web cache, not the API's failing. If you find an issue, please create a new one. I have removed the old comments to keep this feature clean. |
I did some checking on an ESP32-S3 and v3.7.1-dev, and it does look like the cache is working. When I deliberately change some of the web code and re-upload using the Download/Upload page, the browser refreshes the cache for the changed .js files (HTTP 200) and displays the correct version without the need for a ctrl-r/ctrl-f5, while the ones that haven't been changed stay at HTTP 304. This makes sense since the web code already uses Cache Busting during the webpack process. Each generated filename has a unique generated hash key in the name like
I'll leave this issue open for a while. I only tested on Edge. If anyone can reproduce the browser refresh not happening, I'll gladly dig deeper into this. For reference, this is a nice article: https://medium.com/@fatehalisulthoni/cache-busting-3-ways-to-fix-stale-deployment-in-react-8fc046fa7e92 |
With consistent newer versions of the WebUI some users still need to CTRL-R to browser refresh the cache. I was hoping we had fixed this by calculating a hash code for each html/js .gz file, including the date (which is the build time) and adding this to the HTTP headers, but it seems not to be fully working.
The code is in function
ESP8266React::WWData::registerRoutes()
with this code section:Need to look into this again.
The text was updated successfully, but these errors were encountered: