Notifications API
The display side of web notifications (Push API handles delivery). Used for chat messages, calendar reminders, and real-time alerts. Understanding the permission model and notification lifecycle prevents spam UX.
What It Defines
Defines the Notification constructor for displaying system-level notifications outside the browser window. Supports title, body, icon, image, badge, actions (buttons), vibrate pattern, and click/close/error events. Requires user permission via Notification.requestPermission().
Canonical (Normative)
Convenient (Practical)
Maintains the living standards for the web platform: HTML, DOM, Fetch, URL, Streams, and more. These are continuously updated living documents, not versioned snapshots.
Related Specs
Required for web push notifications — the re-engagement channel for PWAs. Works with Service Workers and the Notifications API. Understanding VAPID and the subscription lifecycle prevents broken push implementations.
The gating mechanism for every sensitive browser API. Check permission state before requesting access to avoid unexpected prompt dialogs. The change event lets you react when users revoke permissions in browser settings.
Service Workers power offline support, background sync, and push notifications. Required for serious PWA/installable app behavior.