是否可以在没有 GCM 的情况下在 Chrome 中使用新的推送通知支持? [英] Is it possible to use the new Push Notifications support in Chrome without GCM?

查看:73
本文介绍了是否可以在没有 GCM 的情况下在 Chrome 中使用新的推送通知支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用新的 Push API 时,我可以使用 Google 的 GCM 以外的推送服务吗?服务人员?

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

推荐答案

今天,Chrome 是唯一支持标准推送 API 的浏览器,所以现在简短的回答是否定的.

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 通过 APNS 和专有 API
  • Firefox 正在提供对推送通知的支持 很快,并且可能会使用与 GCM 不同的推送服务器.
  • 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.

总而言之,浏览器/操作系统的不同组合似乎需要不同的推送服务器.将来会有一个 IETF 草案(https://datatracker.ietf.org/wg/webpush/documents/) 应该可以缓解这种情况.也有一些公司致力于将这些问题抽象出来,并收取费用.只需搜索网络推送通知即可获取其中一些.

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.

这篇关于是否可以在没有 GCM 的情况下在 Chrome 中使用新的推送通知支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆