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.

Fundamentals

How web push works and the keys it depends on.

2 guides

  • 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.

Browsers

What each browser needs before it will show a push notification.

1 browser guide

  • 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.

Frameworks

Wiring web push into a specific framework.

1 framework guide

  • 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.