Re: [w3c/push-api] Fire pushsubscriptionchange when user revokes permission (#116)

> +1 For triggering a callback when subscription is revoked by the user

I see your point. Firefox only fires `pushsubscriptionchange` when permission is restored, because the service worker can't resubscribe if permission is revoked...so it didn't really make sense to notify the worker if it couldn't do anything about it.

As you point out, though, the worker can use the event to preemptively remove the old subscription endpoint from its app server, or for analytics.

Your app server will still need to handle the case where the push server drops a subscription without notifying the worker, though. This can happen if the browser isn't connected when the subscription is dropped. The worker will get a `pushsubscriptionchange` event when the browser is relaunched, but your server will get a 404 if it tries to send a message before then.

---
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/push-api/issues/116#issuecomment-221349393

Received on Tuesday, 24 May 2016 18:07:14 UTC