Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop browser from requesting service-worker.js from server

On a former project I was working on there was a manifest.json file while allowed the app to be a progressive web application.

However even now on different projects I can see that my browser is requesting the service-worker.js file from the backend ie:

GET /service-worker.js 404 557.926 ms

How can I turn this off within my browser so I don't see these errant logs come through my app?

like image 714
Anthony Avatar asked Oct 13 '25 02:10

Anthony


1 Answers

You need to unregister the service worker like such:

https://www.codementor.io/@himank/how-to-unregister-service-workers-n8mzf5jce

In case the link should stop working, these are the steps for Chrome.

  1. open the dev console
  2. click "Application" tab
  3. click "Service Workers"
  4. click "Unregister"

enter image description here

like image 187
Anthony Avatar answered Oct 15 '25 06:10

Anthony