[Vuejs]-Push notification in Web pages

0๐Ÿ‘

You can use the Notification API to achieve this.

If you want to use Service Workers to push notifications from a backend, you can check the Push API

These API are still drafts and may only work with modern browsers. Make sure you are using these APIโ€™s over https.

0๐Ÿ‘

you can use web socket, which has integrated in Angular already.

0๐Ÿ‘

use for example:
https://github.com/mqttjs

then in your js:

    this.client = mqtt.connect(url, options);

    if(topics.length>0)
        this.client.subscribe(topics);

    this.client.on("message", (topic:any, payload:any)=>{
        console.log('CONNECTED', payload);
    });

    this.client.on("connect", function (connack: any) {
        console.log('CONNECTED', connack);
    });

And use some server side message broker eg: rabbitMQ or other message router

read this
https://www.rabbitmq.com/web-mqtt.html

0๐Ÿ‘

Yes, Web notification primarily targeted for Web application, client side registration and server sider processing for pushing the notification, below site has both client and server side examples โ€“

ServiceWorker

Leave a comment