Web push notifications, explained browser by browser
Practical guides to web push: how the pieces fit together, how to generate and use VAPID keys, and how to get notifications working in Safari and Next.js.
- How web push works
Web push has three parties: your site's service worker, the browser's push service and your server. The full flow from permission prompt to notification.
- VAPID keys explained
VAPID is a key pair that identifies your server to push services. How to generate the keys, where each one goes and what happens if you change them.
- Safari push setup
Safari supports standard web push on macOS 13 and later, and on iPhone and iPad from iOS 16.4 for web apps added to the Home Screen. What each needs.
- Web push in Next.js
Add web push to a Next.js App Router project: a service worker in public, a client component that subscribes, and route handlers that store subscriptions and send.