NotificationsLimited availability
The Notification() constructor shows a message to the user, typically using the notification system of the host operating system.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–19Not supported
20+Supportedsince Jun 26, 2012
Current: 155Edge
12–13Not supported
14+Supportedsince Aug 2, 2016
Current: 154Firefox
1–21Not supported
22+Supportedsince Jun 25, 2013
Current: 157Safari
1–6Not supported
7+Supportedsince Oct 22, 2013
Current: 27MobileChrome Android
✕Not supportedup to 155
Current: 155Firefox Android
4–21Not supported
22+Supportedsince Jun 25, 2013
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Chrome Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: Notification.
Feature detection
JS · check before using
if ("Notification" in globalThis) {
// Notification is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (44). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Notification | 20 | 14 | 22 | 7 | ✕ | 22 | ✕ |
| Notification.Notification | 20 | 14 | 22 | 7 | ✕ | 22 | ✕ |
| Notification.actions | 53 | 18 | 152 | ✕ | ✕ | 152 | ✕ |
| Notification.badge | 53 | 18 | ✕ | ✕ | ✕ | ✕ | ✕ |
| Notification.body | 33 | 14 | 26 | 11 | ✕ | 26 | ✕ |
| Notification.click_event | 20 | 14 | 22 | 7 | ✕ | 22 | ✕ |
| Notification.close | 20 | 14 | 22 | 7 | ✕ | 22 | ✕ |
| Notification.close_event | 20 | 14 | 22 | 7 | ✕ | 22 | ✕ |
| Notification.data | 44 | 16 | 34 | 16 | ✕ | 34 | ✕ |
| Notification.dir | 20 | 14 | 26 | 7 | ✕ | 26 | ✕ |
| Notification.error_event | 20 | 14 | 22 | 7 | ✕ | 22 | ✕ |
| Notification.icon | 33 | 14 | 26 | ✕ | ✕ | 26 | ✕ |
| Notification.image | 56 | 18 | ✕ | ✕ | ✕ | ✕ | ✕ |
| Notification.lang | 33 | 14 | 26 | 11 | ✕ | 26 | ✕ |
| Notification.maxActions_static | 48 | 18 | 152 | ✕ | ✕ | 152 | ✕ |
| Notification.permission_static | 32 | 14 | 22 | 7 | ✕ | 22 | ✕ |
| Notification.renotify | 50 | 79 | ✕ | ✕ | ✕ | ✕ | ✕ |
| Notification.requestPermission_static | 20 | 14 | 22 | 15 | ✕ | 22 | ✕ |
| Notification.requestPermission_static.returns_promise | 47 | 79 | 46 | 15 | ✕ | 46 | ✕ |
| Notification.requireInteraction | 47 | 17 | ✕ | ✕ | ✕ | ✕ | ✕ |
Show 24 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Notification.secure_context_required | 62 | 79 | 67 | ✕ | ✕ | 67 | ✕ |
| Notification.show_event | 20 | 14 | 22 | 7 | ✕ | 22 | ✕ |
| Notification.silent | 43 | 17 | 132 | 16.6 | ✕ | 132 | ✕ |
| Notification.tag | 20 | 14 | 26 | ✕ | ✕ | 26 | ✕ |
| Notification.timestamp | 50 | 17 | ✕ | ✕ | ✕ | ✕ | ✕ |
| Notification.title | 33 | 14 | 26 | 11 | ✕ | 26 | ✕ |
| Notification.vibrate | 53 | 79 | ✕ | ✕ | ✕ | ✕ | ✕ |
| Notification.worker_support | 42 | 15 | 41 | ✕ | ✕ | 41 | ✕ |
| NotificationEvent | 42 | 17 | 44 | 16 | 42 | 44 | 16.4 |
| NotificationEvent.NotificationEvent | 42 | 17 | 44 | 16 | 42 | 44 | 16.4 |
| NotificationEvent.action | 48 | 17 | 152 | ✕ | 48 | 152 | ✕ |
| NotificationEvent.notification | 42 | 17 | 44 | ✕ | 42 | 44 | ✕ |
| Permissions.permission_notifications | 43 | 79 | 46 | 16.4 | 43 | 46 | 16.4 |
| ServiceWorkerGlobalScope.notificationclick_event | 40 | 17 | 44 | 16 | 40 | 44 | ✕ |
| ServiceWorkerGlobalScope.notificationclose_event | 50 | 17 | 44 | 16 | 50 | 44 | ✕ |
| ServiceWorkerRegistration.getNotifications | 40 | 17 | 44 | 16 | 40 | 44 | 16.4 |
| ServiceWorkerRegistration.showNotification | 42 | 17 | 44 | 16 | 42 | 44 | 16.4 |
| ServiceWorkerRegistration.showNotification.options_actions_parameter | 48 | 18 | 152 | ✕ | 48 | 152 | ✕ |
| ServiceWorkerRegistration.showNotification.options_badge_parameter | 53 | 79 | ✕ | ✕ | 53 | ✕ | ✕ |
| ServiceWorkerRegistration.showNotification.options_data_parameter | 44 | 79 | ✕ | ✕ | 44 | ✕ | ✕ |
| ServiceWorkerRegistration.showNotification.options_image_parameter | 56 | 79 | ✕ | ✕ | 56 | ✕ | ✕ |
| ServiceWorkerRegistration.showNotification.options_renotify_parameter | 50 | 79 | ✕ | ✕ | 50 | ✕ | ✕ |
| ServiceWorkerRegistration.showNotification.options_requireInteraction_parameter | 47 | 79 | ✕ | ✕ | 47 | ✕ | ✕ |
| ServiceWorkerRegistration.showNotification.options_vibrate_parameter | 45 | 79 | ✕ | ✕ | ✕ | ✕ | ✕ |