The Web Push API defines a notification property named tag.

The notification tag acts as an identifier for unique notifications. If we sent two push messages to the same device, with a short delay between them, and display notifications with the same tag, the browser will display the first notification and replace it with the second notification when the push message is received.

If you are using the Realtime Web Push Notifications example you can find the tag: 'demo' defined in the service worker file like shown below:

// The notification properties
   
const notificationOptions = {      
  body: message,      
  icon: 'img/realtime-logo.jpg',
  data: {        
    click_url: '/index.html'                
  },      
  tag: 'demo'
}; 

To show multiple notifications at once then use a different tag for each notification, or no tag at all.

Did this answer your question?