Is it possible to use the new Push Notifications support in Chrome without GCM?

帅比萌擦擦* 提交于 2019-12-07 05:33:20

问题


Can I use a push service other than Google's GCM when using the new Push API with service workers?


回答1:


Today, Chrome is the only browser that supports the standard push API so right now the short answer is No.

A longer answer involves doing different things for different browsers

  • Safari offers desktop notifications via APNS and a proprietary API
  • Firefox is shipping support for push notifications soon and presumably will use a different push server than GCM.

So to summarize, it seems that different combinations of Browser/OS will require different push servers. In the future there is an IETF draft (https://datatracker.ietf.org/wg/webpush/documents/) that should mitigate this. There are also companies working on abstracting these problems for a fee. Just search for web push notifications to get a few of them.



来源:https://stackoverflow.com/questions/33838004/is-it-possible-to-use-the-new-push-notifications-support-in-chrome-without-gcm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!