Does Firebase Cloud Messaging support all major browsers or just chrome?

前端 未结 1 486
北海茫月
北海茫月 2021-01-17 08:58

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

1条回答
  •  礼貌的吻别
    2021-01-17 09:48

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

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

    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.)

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

    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 really needs to update their docs as Enable Push Notifications for your Web App is out of date.

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

    0 讨论(0)
提交回复
热议问题