Urgent.News

What's breaking now, across thousands of outlets.

Tech

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.

Read the original at dev.to →

More in Tech

Recursion vs Iteration: Choosing Your Path Like Neo in The Matrix

The Quest Begins (The "Why") I was knee‑deep in a coding interview when the interviewer tossed me a seemingly innocent problem: “Given a binary tree, return the sum of all its nodes.” My first…

  • Binary trees are recursive data structures mirroring the problem definition.
  • Recursion offers a one-to-one mapping between problem description and code, reducing bookkeeping.
  • Iterative approach required manual stack management, making code longer and less intuitive.

More from Monday 17 August →