Open Bug 1503779 Opened 6 years ago Updated 2 years ago

Set a reasonable PushSubscription.expirationTime

Categories

(Core :: DOM: Push Subscriptions, enhancement, P3)

enhancement

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).
Priority: -- → P3

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.

I think that makes sense—here's the bug for implementing the latest pushsubscriptionchange event.

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.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.