Glossary

Definition

tag (Notification option)

Short definition

tag is a string option, e.g. showNotification("New message", { tag: "chat-thread-42" }), used to identify a class of related notifications. When a new notification arrives with a tag matching one already showing, the browser replaces it in place by default rather than adding a second, separate notification to the shade.

Reviewed August 4, 2026

This is the standard way to avoid flooding a user with a stack of near-duplicate notifications — for example, showing only the latest unread-count notification for a chat thread instead of one per incoming message.

Pairing tag with renotify: true forces the replacement to still alert the user (sound/vibration) even though it is technically an update to an existing notification; without renotify, silent replacement is the default so the user is not re-interrupted for every minor update.

Two notifications with different tags (or no tag at all) are always shown side by side, since tag-based deduplication only applies within the same tag value on the same origin.

tag has no effect on the underlying push message delivery — it purely controls how the resulting notification is presented once showNotification() runs inside the push event handler.

Related terms
renotify (Notification option)
renotify is a boolean option, e.g. { tag: "order-42", renotify: true }, that only has an effect when combined with tag. Without renotify, a new notification that replaces an existing same-tag notification updates silently with no new sound or vibration; with renotify: true, the replacement alerts the user exactly as a brand-new notification would.
actions (Notification option)
actions is an array option passed to showNotification(), e.g. { actions: [{ action: "reply", title: "Reply" }, { action: "dismiss", title: "Dismiss" }] }, that renders extra buttons on the notification itself. The service worker's notificationclick handler reads event.action to see which button, if any, the user pressed.
push event (service worker)
The push event fires on the service worker whenever a message arrives from the push service the browser is subscribed to. A handler typically reads event.data.json() for the payload and calls event.waitUntil(self.registration.showNotification(title, options)) so the browser keeps the worker alive until the notification is actually displayed.
silent (Notification option)
silent is a boolean Notification option, e.g. showNotification("Synced", { silent: true }), that suppresses the sound, vibration and screen-wake behaviour a notification would normally trigger, while still adding it to the notification shade for the user to see whenever they next check.
requireInteraction (Notification option)
requireInteraction is a boolean option, e.g. showNotification("Incoming call", { requireInteraction: true }), that prevents the browser from automatically dismissing the notification after its default timeout (a few seconds on most desktop platforms). The notification instead stays visible until the user clicks it, clicks an action, or closes it manually.
Notification permission states
Notification.permission returns one of three strings: "default" (the user has not yet decided, so the site may still call Notification.requestPermission() to ask), "granted" (the site may show notifications), or "denied" (the site is blocked from showing notifications and, critically, cannot re-prompt programmatically once denied).