Not too long ago I downloaded an open source Rails application to my machine to see if I can contribute to it. One of the features that it has is a service worker. So that if and when a user’s Internet connection is lost, the service worker kicks in and provides for a branded experience.
Because the application was a Rails app, the service worker was registered on localhost:3000
. What this led to was a bunch of error logs because whenever I fired up a different Rails application, Firefox — the browser I frequently use to do development — would think the service worker was for that particular application.
You would think the solution to fix this issue would be located in the developer tools, but it turns out it’s a browser setting.
- Type in
about:debugging#workers
in Firefox’s address bar - Scroll down to the section labelled Service Workers
- Find the service worker you’re looking to unregister and click on the button Unregister