Firebase 云消息传递支持所有主流浏览器还是仅支持 chrome? [英] Does Firebase Cloud Messaging support all major browsers or just chrome?

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

问题描述

我查看了 FCM 的文档,其中提到它是跨平台的.无论如何,FCM for Web 文档都谈到了 Chrome.我想检查 FCM 是否支持向所有主要网络浏览器(包括 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?

推荐答案

您提到的链接仅讨论了对 Chrome 应用程序和扩展的 FCM 支持,对于 Web 来说则是另一回事.

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 Push Protocol,这意味着通过更新 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.

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

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

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

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