gauntface/simple-push-demo

How to enable automatic push notifications?

prithviraju1369 opened this issue · 1 comments

On Click of SEND A PUSH VIA XHR will shows push notification.

But in real Scenario Users Don't Click Buttons to get push notification. Those has to be done on backend, and it should send automatically to browser, so that service workers recognize push notification from server isn't ?

How to approach that ?

Yes you should be trigger push notifications from a server.

Best advice is to use a library like one of these:

https://github.com/web-push-libs/