Firebase Cloud Messaging是否支持所有主流浏览器或仅支持chrome? [英] Does Firebase Cloud Messaging support all major browsers or just chrome?

查看:102
本文介绍了Firebase Cloud Messaging是否支持所有主流浏览器或仅支持chrome?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了FCM的文档,并提到它跨平台.无论如何, FCM for Web 文档都谈到了Chrome.我想检查FCM是否支持到所有主要Web浏览器的消息传递,包括IE,Safari和Firefox?

I have looked into the documentation of FCM and it mentions that it cross platform. Anyhow FCM for Web documentation talks about Chrome. I want to check whether FCM supports messaging to all major web browsers including IE, Safari and Firefox?

推荐答案

您提到的链接仅是针对FCM对Chrome应用和扩展程序的支持,对于网络而言则是另一回事.

The link you mentioned is talking about FCM support for Chrome apps and extensions only, it's a different story for the web.

根据本文,FCM支持Web推送协议: https://developers.google.com/web/updates/2016/07/web-push-interop-wins

FCM supports Web Push Protocol, according to this article: https://developers.google.com/web/updates/2016/07/web-push-interop-wins

现在,FCM支持Web推送协议,您可以保持端点不变,并将URL用作Web推送协议端点. (这使其与Firefox以及以后的所有其他浏览器保持一致.)

Now that FCM supports Web Push Protocol you can leave the endpoint intact and use the URL as a Web Push Protocol endpoint. (This brings it in line with Firefox and hopefully every other future browser.)

您不再需要Firebase项目,gcm_sender_id或Authorization标头.

You no longer need a Firebase project, a gcm_sender_id, or an Authorization header.

Chrome和Firefox都使用 Push API 进行推送通知,并且Firefox已经支持Web推协议,这意味着通过更新FCM服务器端代码,它将在Chrome和Firefox上都可以使用.

Both Chrome and Firefox use the Push API for push notifications and Firefox already supports Web Push Protocol, which means by updating FCM server-side code, it will work for both Chrome and Firefox.

Google确实需要将其文档更新为为您的Web应用程序启用推送通知已过期.

Google really needs to update their docs as Enable Push Notifications for your Web App is out of date.

由于它们根本不支持Push API,因此它不适用于IE和Safari.

It won't work with IE and Safari as they don't support the Push API at all.

这篇关于Firebase Cloud Messaging是否支持所有主流浏览器或仅支持chrome?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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