Push Notifications
Request permission, subscribe to push with the Push API, receive messages in the Service Worker, and display notifications with showNotification.
Why Push Notifications?
Push notifications re-engage users when the app isn't open — message alerts, news updates, abandoned cart reminders. Powered by the Service Worker (so they work even when the page is closed).
The Push API + Notifications API
Two browser APIs work together. The Push API receives messages from a server via a push subscription. The Notifications API displays the message to the user.