Re: [w3c/push-api] Expose pushManager on Navigator (PR #368)

Having a Service Worker Registration without an active ServiceWorker feels like it discards a fairly fundamental invariant that may currently be reflected quite deeply into existing browser implementations.  (It would not be a minor thing to relax this invariant in Gecko.)

Can push subscription storage just be a map from (WindowClient or ServiceWorkerRegistration) to (PushSubscription)?

And then we can sprinkle some "Eligible PushSubscription" dust on top for lifetime management of the contents of the map to deal with the fact that browsers have complex session management things going on, especially on resource-constrained devices and where the ServiceWorkers spec has not concretely addressed https://github.com/w3c/ServiceWorker/issues/626.  This allows browsers latitude in retaining push subscriptions for WindowClients that aren't currently loaded.

Also, this avoids complications with magic treatment of the scope "/" potentially interacting weirdly with the proposal at https://github.com/w3c/ServiceWorker/issues/1512.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/pull/368#issuecomment-2241315574
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/push-api/pull/368/c2241315574@github.com>

Received on Saturday, 20 July 2024 22:22:03 UTC