Set a reasonable PushSubscription.expirationTime
Categories
(Core :: DOM: Push Notifications, enhancement, P3)
Tracking
()
People
(Reporter: marcosc, Unassigned)
Details
(Keywords: dev-doc-needed)
Bringing this over from: https://github.com/w3c/push-api/issues/302 Push subscriptions can last many years without expiring and there is a negative correlation between the age of a push subscription and its expected delivery rate, as described by this study: https://blog.pushpad.xyz/2018/09/web-push-subscription-age-affects-delivery-rates/ Enforcing the browser to set an `expirationTime` for all the push subscription generated would be helpful. Basically that will ensure that an unused endpoint will always be removed after some time... otherwise the number of old, unused endpoints will increase steadily over time (and the average delivery rate will tend toward zero).
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
I think this should be blocked on implementing the latest pushsubscriptionchange
spec that passes both oldSubscription
and newSubscription
to the event handler, as well as blocked on the one-off background sync API (https://bugzilla.mozilla.org/show_bug.cgi?id=1217544), otherwise it will be hard for web developers to reliably handle subscription refreshes.
Comment 2•4 years ago
|
||
I think that makes sense—here's the bug for implementing the latest pushsubscriptionchange
event.
Comment 3•4 years ago
|
||
First of all the standard should be fixed, as I have reported here:
https://github.com/WICG/BackgroundSync/issues/147
Currently the Background Sync can only be used when a window is open, but the pushsubscriptionchange can be triggered at any time... i.e. currently you cannot use Background Sync inside pushsubscriptionchange.
Updated•5 months ago
|
Description
•