11
votes

I am using push notifications on the web using the new service worker based API and have this use case:

  • User opts in to receive notifications on multiple devices/platforms
  • We send notifications to them on all devices/platforms
  • User dismisses a notification on one of those devices/platforms
  • We want to now remotely hide that notification from their other devices/platforms

Given the userVisible restrictions with the Push API, is there any way to achieve this experience?

1
I don't think it's possibile right now, since there is no "on dismiss" event in the Push API - collimarco
That event was actually added in Chrome 50: blog.chromium.org/2016/03/chrome-50-beta-push-notification.html. There's still no way to send a push message that just dismisses other notifications though, so we're only halfway there... - owencm
Oh yes we need this :| - REJH

1 Answers

3
votes

To the best of my knowledge this isn't possible, but it is a common feature request.

The main risk you have with sending a push message to hide a notification is that it may trigger a notification to be shown by the browser which has a message along the lines of:

"example.com performs an update in the background"