3 ms·
I like service workers, but I don't like the lack of control I have. For example, I want Messenger to send me notifications if I have the tab open, but I don't
by dannyw 8y ago
I like service workers, but I don't like the lack of control I have.
For example, I want Messenger to send me notifications if I have the tab open, but I don't want the service worker to maintain a persistent connection and send me notifications with the tab closed.
Unfortunately, I am not able to block service workers. My only option is to block notifications entirely, which doesn't even stop the service worker.
- ahsanejaz 8y agoThe service worker does not maintain a persistent connection. Some websites/pwa's allow you to configure that.
- bryanrasmussen 8y agobut then you're depending on the website/pwa to be a good citizen and allow you to configure that
- sleepychu 8y agoThat's ok, I'm sure the EU will sort out some kind of service worker popup in due course!
- dannyw 8y agoThe service worker should not be allowed to listen to global-push notifications without me telling it to. The notifications dropdown should be: - Always allow - Allow when open - Disallow
- amelius 8y agoI suppose that depends on the type of browser you use.
- untog 8y agoThe service worker can't maintain a persistent connection. Without an active tab it is shut down after 30 seconds or so. It can receive events via the Push API, which is what you're seeing. But if you refuse notification permissions the site cannot use the Push API. I'm actually not sure how it works when you block notifications after having given permission - it's a requirement that you show a notification in response to a push, so if you're blocked, I'm not sure how the browser registers it. More broadly, I agree that it is strange you can opt into the Push API without a permission prompt. I wish it weren't the case, but I do think it would be confusing to users to request separate push and notification permissions - most consider them to be synonymous, even if they aren't.
- nerdponx 8y agoHow much would I have to donate to Mozilla in order to get them to develop a service worker management UI in Firefox?
- karolg 8y agoActually, Firefox has UI for this. Click "Menu -> Web Developer -> Service Workers". This will open a special page "about:debugging#workers". It shows active service workers and allows you to unregister them. There is another even simpler UI at "about:serviceworkers".
- nerdponx 8y agoInteresting, thank you. Why isn't this functionality accessible through the regular settings UI?