Web push notifications reach users who have the site closed, but only after they click Allow once, and a blocked request cannot be repeated from the page. That single permission prompt decides more of the outcome than the wording of any message sent afterward.
How web push works
The page registers a service worker, a background script that can run when the site is not open. The service worker subscribes through the browser’s Push API, and the browser returns a subscription with an endpoint and encryption keys. Your server stores that subscription and later sends messages to the endpoint, which wakes the service worker so it can show the notification. In code that is PushManager.subscribe() on the page side and a push event handler inside the service worker. Everything else is delivery plumbing.

Each browser vendor runs its own push service between your server and the device (Chrome’s is built on Firebase Cloud Messaging), so you rarely talk to one directly. A sending library or a hosted service does that, and Reteno’s mobile push notification service is one example of the hosted kind.
The endpoint is a capability URL, so anyone who knows it can send messages to that user. Protect it like a credential.

Secure context matters too, and in practice that means HTTPS.
Permission
Asking the moment the page loads is the worst pattern, because the user has no context and the prompt blocks whatever they came to do. web.dev’s guidance is to ask when the benefit is obvious: after a purchase, for delivery updates, when a saved item is back in stock, or when someone has been outbid.
For apps where push is the point, such as messaging, show your own dialog first and trigger the browser prompt only if the user clicks to enable.
A settings page or a footer toggle also works.
If the user blocks the prompt, the site cannot ask again, and they would have to find the browser setting themselves. Is one badly timed prompt worth losing a user’s permission for good?
Common questions about web push
Does it work on iPhones? Since iOS and iPadOS 16.4, yes, but only for web apps added to the Home Screen with a manifest set to standalone or fullscreen, and only after a direct tap and the user’s approval. A visitor who never installs the app will not get push. That is a real gap for any site that expects iPhone traffic. Android and desktop browsers have no such step.
What should the notifications say? Informative ones carry updates and news, interactive ones prompt an action such as a reminder or a feedback request, and promotional ones announce sales and launches. Informative and transactional messages earn permission. Promotional ones spend it.
How often is too often? No universal number exists, so watch how many users switch notifications off.
Do you have to ask for consent? The browser enforces its own permission prompt, so yes for the technical part. Beyond that, tell users what kinds of messages to expect and let them opt out from inside your own interface, not only through the browser settings, because most people will not dig through browser menus.
Firefox limits the number of push messages that do not show a notification per site, and waking a service worker costs battery, so do not send silent pushes for no reason.
When should you skip push? When the message is not time-sensitive, when the audience is small, or when most of your users are on iPhones and will not install the app to the Home Screen. Email often does the job in those cases.
- How to Redo in VS Code (Shortcuts and Fixes) - December 5, 2026
- Scaling Customer Support Without Losing Quality: A Practical Guide for Growing Companies - December 5, 2026
- Top MySQL CDC Tools for Streaming Changes to a Data Warehouse - December 4, 2026



