What makes a notification good?
It has a default action
It can be dismissed
it is relevant
It delivers in the background
A good notification:
Explanation:
Push notifications are one of the most valuable capabilities of native apps, and this capability is now available on the web. To get the most out of them, notifications need to be timely, precise, and relevant.
Read more here: https://support.google.com/partners/answer/7336533
If you ask a room of developers what mobile device features are missing from the web, push notifications are always high on the list.
Web push notifications allow users to opt-in to timely updates from sites they love and allow you to effectively re-engage them with customized, relevant content.
The Push API and Notification API open a whole new set of possibilities for you to re-engage with your users.
Two technologies
Push and notification use different, but complementary, APIs: push is invoked when a server supplies information to a service worker; a notification is the action of a service worker or web page script showing information to a user.
Are service workers involved?
Yes. Push is based on service workers because service workers operate in the background. This means the only time code is run for a push notification (in other words, the only time the battery is used) is when the user interacts with a notification by clicking it or closing it.
If you’re not familiar with service workers, read the service worker introduction. We will use service worker code in later sections when we show you how to implement pushes and notifications.