0

I can't find a way to delete service worker that are installed on users's browsers.

I deleted all things related to serviceWorkers and also tryed this : https://stackoverflow.com/a/33705250/11164691

navigator.serviceWorker.getRegistrations().then(function(registrations) {
 for(let registration of registrations) {
  registration.unregister()
} })

I put it on index.html, App.vue... => No effect because files aren't loaded.

The problem is that there are no files that are loaded to the client for those who have the registered serviceworker.

How can I deal with it ? And delete the service workers for my users ?

Alexy
  • 780
  • 6
  • 22

1 Answers1

-1
  1. Removing the registerServiceWorker.js file
  2. Removing the import of registerServiceWorker.js from main.js
  3. Removing the PWA plugin from the devDependencies in package.json
Aviv Ben Shahar
  • 268
  • 1
  • 8
  • already done but that does not delete serviceWorker, old code is still rendered in browser, thanks for the answer – Alexy Nov 04 '21 at 11:00
  • If you are on development - disable the cache on your dev tools. For the build, it will generate file names automatically so no cache will be in the background. You might getting the old version of your app in serving dev. – Aviv Ben Shahar Nov 04 '21 at 11:01
  • It's deploy on firebase hosting, it is on production, and it needs to be done from the application (or whatever), I can't access every users's computer. – Alexy Nov 04 '21 at 11:02