[英]How does Facebook send notifications without tab
Now u see the notification from facebook while facebook site isn't open.现在您可以在 facebook 网站未打开时看到来自 facebook 的通知。 HOW?
如何?
Facebook uses the Push Notifications API: https://www.w3.org/TR/push-api/ Facebook 使用推送通知 API: https : //www.w3.org/TR/push-api/
More information:更多信息:
They use the Push API - https://developer.mozilla.org/en-US/docs/Web/API/Push_API Quoting from there:他们使用推送 API - https://developer.mozilla.org/en-US/docs/Web/API/Push_API从那里引用:
The Push API gives web applications the ability to receive messages pushed to them from a server, whether or not the web app is in the
Push API 使 Web 应用程序能够接收从服务器推送给它们的消息,无论 Web 应用程序是否在
foreground, or even currently loaded, on a user agent.前台,甚至当前加载,在用户代理上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.