How to unregister all installed service workers in Chrome (#snippet)

Today I saw a quick Twitter conversation about service workers. The question was how to uninstall all registered service workers in Chrome.
It turns out that there is one Chrome-specific URL that shows all installed Service Workers …


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis

Today I saw a quick Twitter conversation about service workers. The question was how to uninstall all registered service workers in Chrome.

It turns out that there is one Chrome-specific URL that shows all installed Service Workers – chrome://serviceworker-internals/. It lists service worker internals such as installation status, the running script and the service worker scope.

Scope: https://twitter.com/
Registration ID: 0 (unregistered)
Navigation preload enabled: false
Navigation preload header length: 4
Active worker:
Installation Status: ACTIVATED
Running Status: RUNNING
Fetch handler existence: EXISTS
Script: https://twitter.com/sw.js
Version ID: 111
Renderer process ID: 68693
Renderer thread ID: 19
DevTools agent route ID: 52
Client:
ID: fcf2a23e-9af3-4001-b196-c942340be16a
URL: https://twitter.com/stefanjudis

The page also includes actions for every service worker and unregister is one of these.

Ingvar Stepayan advised that you can quickly run a single JS command in the console to get rid of them all.

$$('.unregister').forEach(b => b.click())

It's good to know that this page exists. :)

Overview page of chrome://serviceworker-internals/ with open JS Console


Reply to Stefan


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis


Print Share Comment Cite Upload Translate Updates
APA

Stefan Judis | Sciencx (2020-09-28T22:00:00+00:00) How to unregister all installed service workers in Chrome (#snippet). Retrieved from https://www.scien.cx/2020/09/28/how-to-unregister-all-installed-service-workers-in-chrome-snippet/

MLA
" » How to unregister all installed service workers in Chrome (#snippet)." Stefan Judis | Sciencx - Monday September 28, 2020, https://www.scien.cx/2020/09/28/how-to-unregister-all-installed-service-workers-in-chrome-snippet/
HARVARD
Stefan Judis | Sciencx Monday September 28, 2020 » How to unregister all installed service workers in Chrome (#snippet)., viewed ,<https://www.scien.cx/2020/09/28/how-to-unregister-all-installed-service-workers-in-chrome-snippet/>
VANCOUVER
Stefan Judis | Sciencx - » How to unregister all installed service workers in Chrome (#snippet). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2020/09/28/how-to-unregister-all-installed-service-workers-in-chrome-snippet/
CHICAGO
" » How to unregister all installed service workers in Chrome (#snippet)." Stefan Judis | Sciencx - Accessed . https://www.scien.cx/2020/09/28/how-to-unregister-all-installed-service-workers-in-chrome-snippet/
IEEE
" » How to unregister all installed service workers in Chrome (#snippet)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2020/09/28/how-to-unregister-all-installed-service-workers-in-chrome-snippet/. [Accessed: ]
rf:citation
» How to unregister all installed service workers in Chrome (#snippet) | Stefan Judis | Sciencx | https://www.scien.cx/2020/09/28/how-to-unregister-all-installed-service-workers-in-chrome-snippet/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.