please explain how push notifications work
-
I'm confused by push notifications.
Some websites ask if they are allowed to send me push notifications. If I say "yes" and chance my mind later, the only option I see is to click on the appearing bubbles and block notifications from that site.
If i block the notifications, is it the same when saying "no"? Or will there be some connection in the background and the notifications get blocked afterwards?
Is there some overview where I can check all the sites, that will be queried for notifications regularly?
-
@Flexman
Hi, you cant reach settings for the notification system in Vivaldi but you can use the Chromium settings.
Openchrome://settings/content/notifications
, there you can see/add/edit your page notifications.Cheers, mib
-
@Flexman Check website permissions in privacy and security (
vivaldi://settings/privacy/
). There websites with special permissions are listed and you can change permissions for individual websites and globally. -
Thanks for the quick reply, good to know.
But can someone explain to me, what notifications are exactly? What happens in the background of the browser and why do they even appear if I don't have the website open?
-
@Flexman Websites you don’t have open can’t send notifications.
edit: hmm, seems to be possible through push-notifications, but I wouldn’t give any website permission to do this personally.
-
@luetage Oh, they did! It was some years ago but Tinder sent me some messages although the site wasn't open. Can be quite embarassing and you don't even know where to stop this.
Maybe this has changed. But does it mean, Websites that are open just are checking for new news. Is this a standardised protocol?
-
@Flexman Yeah, web apps can do it through service workers and push notifications apparently. Don’t give them permission to do that.
-
@Flexman
Push notifications use service workers, many pages install them in the background, this forum too.
For more detailed information search for "notifications service workers".
You can check which service workers are installed with openchrome://serviceworker-internals
I delete them from time to time with Ctrl+Shift+Del and this settings: -
@mib2berlin said in please explain how push notifications work:
service workers
Thats interesting. This means, if I just block them, the service worker will still be active, but it gets blocked.
Which Data exactly includes deleting this service worker? Applications cache? -
@Flexman
I guess Storage but I delete the App cache too.
After "deleting" they get Unregistered, after restart they get removed.
So nothing is active until you open the page again.https://en.wikipedia.org/wiki/Progressive_web_app#Service_workers
-
If you allow notifications from a site, intentionally or accidentally, the far easiest way to disallow them is going to the site that sends them, going into the Site Info (padlock) dialog and toggling the permission off:
Disabling them will explicitly set them to Denied from that site.
Clicking "Reset permissions" will reset to the default (Ask).Some sites (notification spammers) makes it difficult to deny them, often using obscure domains with no content or automatically redirecting.
In that case using Vivaldi's Website Permissions orchrome://settings/content/notifications
will work as well to remove the permission.Service Workers are a plague of the modern web, like notification spam. They can't be blocked in settings, and any site can install them. However, they can't really do anything unless you've allowed the site an explicit permission.
I block Service Workers in uBO with the following rule:
||$csp=worker-src 'none'
This will also work in the Vivaldi adblocker with a custom blocklist file.
Note that this will break some sites so you'll need to add some exceptions, for instance Spotify:@@||$csp=worker-src 'none',domain=spotify.com