Top "Service-worker" questions

A service worker is JavaScript code that, once registered with an associated origin and scope, will respond to browser-initiated events, even when the pages it controls are no longer open.

What does event.waitUntil do in service worker and why is it needed?

MDN suggests that you do the following to create and populate service worker cache: this.addEventListener('install', function(event) { event.…

javascript-events promise service-worker
How to clear a Service Worker cache in Firefox?

In Chrome it is possible to clear the Service Worker cache from the Dev Tools. How can we achieve that …

firefox browser-cache service-worker
Setting service worker to exclude certain urls only

I built an app using create react which by default includes a service worker. I want the app to be …

service-worker create-react-app
Disable service workers when in development mode.

In case of our development, we serve files from https://localhost as the app is hosted in salesforce.com. In …

service-worker
"Status Code:200 OK (from ServiceWorker)" in Chrome Network DevTools?

I am familiar with http status codes, but recently I saw a strange line in my chrome debugger. Instead of …

javascript html google-chrome http-headers service-worker
Angular 7 - service worker not registered

I did everything as written in "https://angular.io/guide/service-worker-getting-started" to make my application PWA. Used exactly this commands: …

angular angular-cli service-worker progressive-web-apps angular7
Does service worker runs on background even if browser is closed?

I see push notification for Facebook web in chrome only when I open chrome. I know that this notification are …

javascript google-chrome service-worker progressive-web-apps
Use ServiceWorker cache only when offline

I'm trying to integrate service workers into my app, but I've found the service worker tries to retrieve cached content …

javascript browser-cache web-worker service-worker
Firefox: Service Worker: SecurityError: DOMException: The Operation is insecure

In app.js, I am checking the serviceWorker existence in navigator object and if available then registering the SW. if (…

javascript firefox service-worker progressive-web-apps service-worker-events
Can I have multiple service workers both intercept the same fetch request?

I'm writing a library which I will provide for 3rd parties to run a service worker on their site. It …

service-worker progressive-web-apps