Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Mar 31, 2020

Description

Fixes #53631

Does / need to be configured as a baseUrl, or does it work on subdomains subdirectory automagically?

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 31, 2020
@jonahwilliams jonahwilliams requested a review from ditman March 31, 2020 17:53
@ditman
Copy link
Member

ditman commented Mar 31, 2020

According to the example here:

https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Offline_Service_workers#Installation

".../" and ".../index.html" are two different paths. (It makes sense since / -> /index.html is a server-side convention, and not anything that the browser knows about.)

@ditman
Copy link
Member

ditman commented Mar 31, 2020

(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)

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jonahwilliams
Copy link
Contributor Author

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.

@ditman
Copy link
Member

ditman commented Apr 1, 2020

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.

I understand. I'll pay more attention next time and see if "the next reload" gives me non-stale content.

@jonahwilliams
Copy link
Contributor Author

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 jonahwilliams deleted the fix_root_path_caching branch April 1, 2020 18:31
@ditman
Copy link
Member

ditman commented Apr 1, 2020

@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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PWA app doesn't work offline

4 participants