Web Push in the Next.js App Router: Field Notes on Service Workers, VAPID, and the iOS Rule That Silently Blocks Everything
Web Push is a browser API that delivers a server-sent notification to a device while your site is closed, and in a Next.js App Router project it needs exactly three parts: a service worker served from the origin root, a VAPID key pair, and a Node.js-runtime route handler that sends. On iOS Safari it needs a fourth thing nobody documents loudly enough — the user must install the site to…
Web Push is a browser API that sends server-sent notifications to devices even when a site is closed. In a Next.js App Router project, it requires three components: a service worker served from the origin root, a VAPID key pair for server authentication, and a Node.js runtime route handler to send pushes. On iOS Safari, users must install the site to the Home Screen before they can receive push notifications, which sets an additional requirement not often emphasized enough.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.