-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
service-worker caching policy too aggressive #14836
Comments
Fantastic find, confirmed to happen in chrome too and break plenty of other items running on the same hostname. |
For a temporary work around you can add an exception for a prefix to the cacher. This is very fragile as it depends on their obfuscated code but wfm for now: then as long as /SOME_PREFIX_HERE is used to start a proxy path it won't cache it. If the code changes just search that file for api|auth and copy that regex code and add another for what you want. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is still an issue. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is still an issue. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is still an issue. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is still an issue. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is still an issue. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is still an issue. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
still an issue |
Checklist
Describe the issue you are experiencing
When running Home Assistant behind a reverse proxy along with other web apps service-worker.js will cache content from other apps which causes them to break. Currently service-worker is configured to cache anything that comes back with a 200 (or 0) status code.
An example of this is:
-- (A) Home Assistant being served at
https://domain.tld/
-- (B) Z-Wave JS UI being served at
https://domain.tls/_/zwavejs2mqtt
Describe the behavior you expected
service-worker should only cache things that actually relate to HA.
Would it be worthwhile to cache content based on a header?
https://developer.chrome.com/docs/workbox/modules/workbox-cacheable-response/#caching-based-on-headers
https://github.com/home-assistant/frontend/blob/dev/src/entrypoints/service_worker.ts#L64
Steps to reproduce the issue
High level reproduction steps are outlined in the problem. Can provide specific configs/setup information if needed.
What version of Home Assistant Core has the issue?
core-2022.12.7
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
FireFox 108
Which operating system are you using to run this browser?
Linux Mint 21
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: