- From: Jake Archibald <notifications@github.com>
- Date: Thu, 30 Mar 2017 23:21:12 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 31 March 2017 06:21:43 UTC
It works as I described in https://github.com/w3c/ServiceWorker/issues/1085#issuecomment-290301263 & it's what the spec says. Here's a demo https://cdn.rawgit.com/jakearchibald/aa15821ef593aa871b241898f926a492/raw/0fe98d28a5c2bddbabc5aafd9260ca0274e82cc6/, and here's the code https://gist.github.com/jakearchibald/aa15821ef593aa871b241898f926a492. * When "./" requests "./foo.html", it triggers a fetch event in `navigator.serviceWorker.controller`, which is "./sw.js", which has a scope of "./". * When "./foo.html" requests "./", it triggers a fetch event in `navigator.serviceWorker.controller`, which is "./sw-foo.js", which has a scope of "./foo". Longest matching scope wins control of the page. Requests go through the service worker which controls the page - `navigator.serviceWorker.controller`. -- 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/1085#issuecomment-290627408
Received on Friday, 31 March 2017 06:21:43 UTC