Why Runtime service worker (runtime-service-worker.js) is being loaded, but can’t be found?

After doing some research I found the reason causing this.

Before I moved the client’s website to its domain, they had their previous website in the old server. As we started using the new website, we started using another server.

It seems that the previous website used Google’s Service Worker. My browser (and some others’ too) included the cookie from the previous website, which included this Service Worker.

The service worker is unfamiliar to me, but apparently one of its features is that it will try to save website content to the device for offline using. Therefore in my case the browser also tried to load scripts from files that didn’t exist anymore. Some of the scripts are loaded from Google’s servers but apparently this one file was located on the client’s previous server. My broswer loaded the file from cache, so that’s why I didn’t find it.

Removing the Service Worker cookie in the browser solved the problem, but only in my browser. Now I’m trying to figure out if there’s a method to remove the cookie from visitors’ browser who visited the previous website. As long as visitors have the Service Worker cookie, their browsers will try to fetch a file that doesn’t exist anymore.