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.

Add createHandlerBoundToURL response to the cache if it is missing

See original GitHub issue

Library Affected: workbox-precaching

Browser & Platform: “all browsers”.

Issue or Feature Request Description: We use to code to precache navigation route “app-shell.html” as

const handler = createHandlerBoundToURL('/app-shell.html');
const navigationRoute = new NavigationRoute(handler);
registerRoute(navigationRoute);

but if the item, for some reasons and with someone (buggy code, extension or by user), is deleted from the cache - we have not have offline mode in the future requests will be made to the server but the result will not be stored in the cache

Please add an ability to put the response in the cache if it’s absent in it in createHandlerBoundToURL code

the same problem occurs with precacheAndRoute when deleting the entire cache the application will work online but will never work offline

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
webmaxrucommented, Mar 3, 2021

Thanks for this article and for your kind words about my recent Workbox tech talk there, @budarin!

To make this content available for the global audience, let’s also post an English version? (I can help with the translation)

1reaction
budarincommented, Mar 3, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

WorkboxError non-precached-url index.html #120 - GitHub
I'm getting the error below when running the app with vite preview and ... createHandlerBoundToURL @ PrecacheController.js:276 (anonymous) ...
Read more >
workbox-precaching - Chrome Developers
This method will add items to the precache list, removing duplicates and ensuring the ... The precached URL which will be used to...
Read more >
Cache-Control - HTTP - MDN Web Docs
The Cache-Control HTTP header field holds directives (instructions) — in both requests and responses — that control caching in browsers and ...
Read more >
How to Make your React App a Progressive Web App (PWA)
But there's an important part missing: Our React application still doesn't register the Service Worker. We can do this by adding the following ......
Read more >
React Query doesn't seem to be caching - Stack Overflow
I was following an example I saw on YouTube for using React Query, but I can't seem to get the caching to work...
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