I'm encountering an issue with a Progressive Web App (PWA) where push notifications continue to be received even after the PWA is uninstalled or deleted.
Here are the considerations:
I cannot determine the exact time when the PWA is uninstalled. The service worker remains active even after the app is deleted, leading to the push notifications still being received. How can I stop receiving push notifications after the PWA is uninstalled or deleted? Is there a way to automatically unregister the service worker and cancel the push subscription when the app is deleted?
Any help or pointers would be greatly appreciated!
Tried it
Check if the service worker is automatically removed when PWA is uninstalled Even after uninstalling the PWA, Chrome retains the service worker. The service worker runs as a background process in the browser and continues to receive push notifications.