gauntface/simple-push-demo

service-worker.js without third party?

pwFoo opened this issue · 2 comments

pwFoo commented

Hi @gauntface
I looked at your code and demo because I try to add web notifications (with support for closed browser notifications). Your demo works fine, but is it possible with a custom service-worker.js without third party services like fcm? With notifications triggert by website / cron directly to the device / browser?

@pwFoo You must use a push service selected by the browser to send a notifciation. Firefox uses mozilla push service, Chrome uses FCM, Edge will use a Microsoft push service (I don't know the name).

All the code here is using open web standard and you don't have to know what the push service is, it should work for any URL.

Does that make sense?

pwFoo commented

Ok, I think it makes sense selected by browser. Thanks!