question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

use network-first strategy for start_url

See original GitHub issue

Since 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:open
  • Created 3 years ago
  • Reactions:12
  • Comments:5

github_iconTop GitHub Comments

7reactions
voxivoidcommented, Jan 19, 2021

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

2reactions
niklaswolfcommented, Oct 8, 2021

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…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found