Communication & Background

Notifications

Probing…

Notifications is a web platform capability in the Communication & Background category. System notifications from the page. Supported in Chromium 22+, Firefox 22+, and Safari 7+. Requires a secure context (HTTPS or localhost) and a user gesture such as a click or tap.

Secure contextUser gesture

Permission notifications: unknown

Try it

Loading demo…

Code

const permission = await Notification.requestPermission()
if (permission === 'granted') {
  const n = new Notification('Hello', {
    body: 'Sent from the demo',
    icon: '/pwa-192x192.png',
  })
  n.onclick = () => console.log('clicked')
}

Browser support

Chromium
22
Firefox
22
Safari
7

Frequently asked questions

Which browsers support Notifications?

Supported in Chromium 22+, Firefox 22+, and Safari 7+.

Does Notifications require HTTPS?

Yes. Notifications needs a secure context, so it only works over HTTPS (or on localhost during development).

What is Notifications used for?

System notifications from the page.

Can I try Notifications in my browser?

Yes. shwcs.net runs a live Notifications demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.

MDN reference ↗ Specification ↗