Re: [w3c/ServiceWorker] Allow overlapping scopes (#1085)

Could there be an opt-in to this kind of behavior?

It looks like at the moment we have to write our SW to be a catch-all that handles everything, including caching multiple different versions of the app separately, as well as caching some of the root-level files separately. What we really want is a series of small, independent SWs that are only responsible for one thing, which makes it more modular and easier to write. Currently it seems we have to change the URL structure of our app to get what we want, and oops, we only just figured this out after deploying to production. (Service Worker strikes again!)

Other approaches have their own drawbacks too - for example we tried having `/latest/` redirect to `/r2/` (but we don't want users to bookmark specific versions), tried having `/latest/` URL rewrite all its contents to the latest version (but then if you load `/r2/` directly, it re-downloads an identical version of the entire app again a second time, instead of knowing it can serve from `/latest/`)... I'm not sure how to structure this without pitfalls. Changing the base href at `/` works nicely, except SW scope rules interfere.

-- 
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-290650226

Received on Friday, 31 March 2017 08:29:33 UTC