Unregister all service worker from localhost⚙️☁️

Simone Parri
2 min readMar 30, 2021

--

Have you ever tried to develop with a service worker?

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

chrome logo

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)

edge (chromium) logo

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

firefox logo

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 🍺❤

powered by simobox.it

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Simone Parri
Simone Parri

Written by Simone Parri

Senior software engineer, in love with IT stuff, but I also love scuba diving, basketball and ski.

No responses yet

Write a response