PWA 的推送通知或 Web 推送通知

Push notifications or Web push notifications for PWA

首先,我想声明一下,我一直在研究推送通知和网络通知之间的关系,但我有点困惑。

我从这里了解到 PWA 的推送通知不适用于 Safari 上的 iOS(iPhones):

但是,如果 iPhone 用户正在使用 Chrome,这是否意味着它们可以工作?或者推送通知不适用于任何浏览器 iPhone 秒内的 PWA?

这使我进入网络通知。 Web 通知在后台对 PWA 有效吗?我的问题是 Web 通知是否足以替代推送通知,或者 Web 通知不能由服务器触发,因此推送通知仍然是必要的吗?

Do web notifications work for PWAs in the background?

是的,他们在后台工作,即使网站关闭,感谢 service workers

收到推送信号后,将激活服务工作者并调用 JavaScript 回调。

are web notifications a good enough substitute for push notifications

Web 通知与在后台传递消息的 W3C 推送 API 一起,是真正的推送通知,即使网站处于关闭状态也可以传递已关闭。

is it that Web notifications cannot be triggered by a server and thus push notifications are still necessary?

是的,可以使用 Push APIWebPush 在后台从您的服务器触发网络推送通知协议。

does it mean that they work if the iPhone user is using Chrome?

目前(2021 年第一季度),iPhone 不支持在任何浏览器上进行网络推送。