Re: [w3c/ServiceWorker] consider allowing a non-scope identifier for registrations (#1512)

> For instance, what if a web developer wants to replace two existing service workers by three new service workers.

What is the use case for this?  I am having a hard time coming up with one based on the partners I have talked to.

A more realistic scenario is collapsing multiple old registrations into a single list scope registration.  But I think we could tackle that by allowing the new registration to simply overwrite old registrations with a "force:true" option or something.  That would be much less complex than a general locking mechanism.

If we want to allow registrations to change scope, it seems necessary to me for the scope not to be used as the unique identifier for the registration.  I don't see how trying to have mutable unique identifiers for registrations makes things any easier.  If anything it seems to make things dramatically more complex.

> Something like navigator.serviceWorker.updateScopes({sw1: myScope1, sw2: myScope2, ...})

Can you please elaborate on this?  I see you've identified two scopes, but I don't understand what this is supposed to do to the service worker registrations.

> Let's say we introduce the possibility for a service worker to have a 'null' scope

This sort of thing was proposed long ago by mozilla with `new ServiceWorker()`, etc, but I think the ship has long sailed on that approach.  In any case, I don't see how it helps with the use cases here and it seems orthogonal to the issue at hand.

-- 
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/1512#issuecomment-707164973

Received on Monday, 12 October 2020 14:46:34 UTC