-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[flutter_tools] cache the base URL as index.html #53666
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
[flutter_tools] cache the base URL as index.html #53666
Conversation
|
According to the example here:
|
|
(Should we do the Updates part as well, though? I've seen some caching being too persistent, but I haven't determined if it's the service worker caching too aggressively, or the CDN being nasty) |
ditman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
|
If you're running a site with a service worker cache, its expected that you need at least one reload to pull the new content. Any updates to the service worker should trigger the update/install path, but none of the new content can be shown until after the cache has finished populating. |
I understand. I'll pay more attention next time and see if "the next reload" gives me non-stale content. |
|
You can also see this information in the application tab. It should tell you if you have a service worker pending activation, et cetera. We could also switch the logic to online first instead of offline first |
|
@jonahwilliams yep, I've been looking at that, but normally if I have that tab open, I'll just "clear storage" and be done with it. The issue is that normal visitors of a site are not expected to do that to get the latest. I've read somewhere that the serviceworker itself is not cached by the serviceworker, and I haven't thoroughly tested my issue yet, so I'll pay more attention next time and get back to you :P |
Description
Fixes #53631
Does
/need to be configured as a baseUrl, or does it work onsubdomainssubdirectory automagically?