Questions tagged [workbox]

Workbox is a set of production-ready service worker libraries and build tools.

Workbox is a collection of build and runtime libraries that can power your Progressive Web App's service worker. Learn more at https://developer.chrome.com/docs/workbox/

830 questions
26
votes
5 answers

How can I turn off the workbox browser console messages?

Very simply, I would like to disable the display of the repeated workbox messages that appear in my browser console while I am debugging. For instance, I don't need to see: WorkBox: Using NetworkFirst to respond to…
murmeister
  • 582
  • 1
  • 4
  • 7
21
votes
2 answers

Workbox service worker: Cannot use import statement outside a module

I am creating a React App using the Create React App utility and I want to override the default service worker that it provides. Since I don't want to eject my app, I am using the workbox-build package to create my service worker (I also used yarn…
Felipe
  • 6,312
  • 11
  • 52
  • 70
18
votes
1 answer

Checking for service worker updates in a single page app

We have a signal page application that has Service worker installed and active. Now our server rebuilds the app, Service worker file is being updated on the server side. Our client has no idea about this new Service worker file and it is still…
Sandeep Sharma
  • 1,855
  • 3
  • 19
  • 34
17
votes
6 answers

Nextjs remove workbox console.log messages

Any idea how to disable these console.log messages from workbox in a NextJS project?. I just started a new repo and it is just giving me too much information I don't need now
CarlosZ
  • 1,026
  • 1
  • 9
  • 16
16
votes
1 answer

What are the downsides to using skipWaiting and clientsClaim with Workbox?

By default skipWaiting is set to false in Workbox. Assuming you're only using the Workbox-created service worker for caching, are there any downsides to setting this to true? Without doing so, the next build of your app will ship updated resource…
Adam Rackis
  • 82,527
  • 56
  • 270
  • 393
15
votes
2 answers

Clear Workbox cache of all content

Using Workbox in a service worker in a javascript webapp. Want to clear the entire workbox/application cache of all content... basically go back to a state as similar as possible to the state before first load of the app into a browser, potentially…
user2330237
  • 1,629
  • 5
  • 20
  • 39
15
votes
1 answer

Using workbox runtime caching, requests are not showing on cache storage on chrome

I am using workbox runtime caching to cache external calls (materialize.css is one of those). In my network tab it shows that the request is coming from serviceWorker (looks fine): But on cache storage my runtime cache looks empty: You can see my…
13
votes
1 answer

Workbox: the danger of self.skipWaiting()

I use Workbox to pre-cache assets required to render the app shell, including a basic version of index.html. Workbox assumes that index.html is available in cache, otherwise, page navigation fails because I have this registered in my Service…
12
votes
1 answer

How to integrate PWA with Next.js to allow for notifications and push notifications

I'm building a PWA with next.js and have been having a few issues. I am trying to integrate in device motion to my users accounts and geolocation, and then notifications. Basing this off of this repo, https://github.com/shadowwalker/next-pwa/ , and…
LeCoda
  • 538
  • 7
  • 36
  • 79
12
votes
3 answers

Waiting for window load event to register service worker

I stumbled upon this snippet in Google Workbox documentation: