- From: Zubair Bashir <notifications@github.com>
- Date: Sun, 05 Apr 2020 03:36:40 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 5 April 2020 10:36:53 UTC
I'm looking for something like an "uninstall" event in the worker global scope. Here's my use case: When a user clears up the site settings, it essentially removes the service worker associated with the website which in turn removes the push-subscriptions, if any for the client, from the browsers PushService. Initiating a push to that subscription, from the backend server is now useless as there wouldn't be a subscription in the first place in the PushService. Hence, storing such subscriptions on the backend server is clearly a waste of space. A possible solution would be to listen for a service worker "uninstall" event and dispatch an API call to the backend server to remove the push subscription associated with the current service worker. Hence, the need. -- 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/1511
Received on Sunday, 5 April 2020 10:36:53 UTC