Unregister all service worker from localhost⚙️☁️
Have you ever tried to develop with a service worker?
During your tests are you sure you debug the right service worker?
Do you want to wipe out all old service worker or service worker developed for other project?
During the testing path the service worker is always registered under localhost domain, so there is a trick to unregister all the service worker on one time…
Follow this step depending on which browser you use for developing.
Google Chrome
navigate to:
chrome://serviceworker-internals/?devtools
open the console using F12 key or “Developing tools” on the menu
on console tab paste and execute
$$(‘.unregister’).forEach(b => b.click())
Edge (chromium version)
navigate to :
edge://serviceworker-internals/?devtools
open the console using F12 key or “Developing tools” on the menu
on console tab paste and execute
$$(‘.unregister’).forEach(b => b.click())
Firefox
navigate to :
about:debugging#/runtime/this-firefox
open the console using F12 key or “Developing tools” on the menu
on console tab paste and execute
$$(‘.qa-unregister-button’).forEach(b => b.click())
❤🍺 If you like this article buy me a beer 🍺❤