- From: Rishabh Nigam <notifications@github.com>
- Date: Thu, 10 Oct 2019 12:08:40 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 10 October 2019 19:08:42 UTC
Hi , I am using service worker in my website and it is showing unexpected behaviour. I have the following code `window.addEventListener('load', function(){ navigator.serviceWorker.register("/service-worker-mobile.js",{scope: "/"}); });` Now, service-worker-mobile.js is fetched and starts to register but then becomes redundant and a new service worker( which I am not requesting anywhere in my code) gets requested as "service-worker.js". To tackle this problem , I created routing for "/service-worker.js" to rewrite it to "/service-worker-mobile.js" in a virtual host context in NGINX configuration. I am not able to figure out, why this service-worker.js is being requested. Any help would be appreciated and thanks in advance. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1479
Received on Thursday, 10 October 2019 19:08:42 UTC