Notifications
Published
Notifications are how an installed PWA re-engages users after they leave: a server pushes a message, the service worker wakes to handle it, and a system notification appears. The power comes with a strict permission model — ask in context, on a gesture — and platform rules, notably that iOS requires the PWA to be installed to the Home Screen first.
These entries cover the push pipeline, the permission model, and periodic background updates.
In this section
Section titled “In this section”Web PushThe Push API + VAPID subscriptions, the permission model, the service worker push/notificationclick events, and the iOS requirement.
Periodic background sync for updatesHow the Periodic Background Sync API refreshes content in the background, how that differs from a push notification, and the install/engagement gate.
iOS and Safari Web Push (16.4+)Web Push on iOS, iPadOS and Safari: the Home Screen requirement, the gesture-bound prompt, VAPID subscriptions, and the WebKit rules to design around.
Notification actions and badge optionsHow Notification actions buttons and the badge image option work, their persistent-notification requirement, and current browser support per MDN.
Notification triggers: the discontinued showTrigger / TimestampTrigger proposalWhat Chrome's Notification Triggers API (showTrigger and TimestampTrigger) was meant to do, its feature-detection pattern, why Chrome's team ended its development, and why showTrigger and TimestampTrigger are absent from MDN's current showNotification() options reference.
The Notification interface: constructing and reading a single notificationThe Notification() constructor and its options (body, icon, tag, data, requireInteraction), the click/close/error events, and why calling it directly throws a TypeError on nearly all mobile browsers per MDN.
The Notifications API: system notificationsHow a PWA shows OS-level notifications: the permission model, persistent versus non-persistent notifications, and why mobile means persistent ones.
The notification permission modelHow Notification.permission's three states work, why requestPermission() needs a user gesture, and why MDN says to stop prompting once a user has said no.
← Back to the Reference overview.