Send web push notifications from a website
8 steps · about 2 h 15 min · Intermediate
- See how web push works end to end (article, web.dev, 15 min)
Maps the browser, push service and your server in one diagram.
- Learn the Push API surface (reference, MDN, 15 min)
Names the objects you will call: PushManager, PushSubscription, push events.
- Request permission and show a notification (tutorial, MDN, 20 min)
Covers asking at the right moment and what users see.
- Subscribe a user and store the subscription (tutorial, web.dev, 20 min)
Walks through the subscribe call and sending it to your backend.
- Understand the Web Push protocol and VAPID (article, web.dev, 20 min)
Explains the signed, encrypted request your server sends.
- Check the VAPID specification (reference, IETF, 15 min)
The standard behind the application server keys you generate.
- Send pushes from Node.js with web-push (repo, GitHub, 15 min)
A maintained library that handles keys and encryption for you.
- Make push work in Safari and on iOS (article, Apple Developer, 15 min)
Lists Apple's extra rules, such as home screen web apps on iOS.