use network-first strategy for start_url
See original GitHub issueSince Lighthouse made it mandatory to respond to start_url
when offline, we are pre-caching it (3.2.1). A build-time revision added by 3.3.0 / #386 but since revision is per-build, cached version for start_url
may get stalled with target: 'server'
since workbox does not supports NetworkFirst
strategy for precache assets.
This is a known issue for users that use target: 'server'
:
- If
start_url
is not customized or is distinct it might cache ATH version until next build - If
start_url
is customized to/
, it might caching landing until next build
Issue Analytics
- State:
- Created 3 years ago
- Reactions:12
- Comments:5
Top Results From Across the Web
Network-first Pre-cached PWA Start URLs with Workbox
An offline Start URL is now a requirement for Chrome to show the native PWA install prompt. This is called a "Network-first" caching...
Read more >How to pre-cache a workbox NavigationRoute NetworkFirst ...
The basic approach that you're attempting—calling cache.add(startUrl) —should be fine, although I would recommend doing that in your install ...
Read more >workbox-strategies - Chrome Developers
A set of runtime caching strategies that will handle responding to a request, normally used with `workbox-routing`.
Read more >Huge performance boost and easy to configure - [PWA] Review
Thanks for making it easy to implement service workers with hooks as well, ... to be aware of which is not present when...
Read more >A custom service worker, next-pwa - ERBriggs Web Dev
... new NetworkFirst({ cacheName: 'start-url', plugins: [new ... Use a stale-while-revalidate strategy for all other requests.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
any news regarding this issue? every time we do a new deploy the start_url gets stalled and then we get a lot of loading chunk errors because it tries to access files that do not exist anymore on the server
Does anybody have a good workaround or ideas for this? This seems like a pretty major issue for users that install the app as PWA.
A real “bad” workaround could be to trigger a new build/deployment, when changes on the home-page are detected. This of course is highly dependent on where the content of this page is coming from. Of course this is not a solution to this problem and not an option for most people either…