I had an angular2 app running on my domain and it's now replaced by a Rails app.
However I keep getting error logs about InvalidCrossOriginRequest on /service-worker.js
Is there any way to remove the old service worker from my user's browser?
I had an angular2 app running on my domain and it's now replaced by a Rails app.
However I keep getting error logs about InvalidCrossOriginRequest on /service-worker.js
Is there any way to remove the old service worker from my user's browser?
The service worker is now saved on your clients and still running until it been removed. You can remove service workers programmatically by adding this to your js in new site:
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for (let registration of registrations) {
registration.unregister()
}
})
reference: unregister, credit: How do I uninstall a Service Worker?