Definition
tag (Notification option)
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.
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.