How does Facebook send notifications without tab

后端 未结 2 1079
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-04 03:21
  1. Go to facebook and allow HTML5 Desktop Notification for it.
  2. Close facebook tab.
  3. Ask somebody to write you message on facebook.

Now u s

相关标签:
2条回答
  • 2021-01-04 03:44

    Facebook uses the Push Notifications API: https://www.w3.org/TR/push-api/

    More information:

    • https://developers.google.com/web/fundamentals/push-notifications/
    • https://developers.google.com/web/fundamentals/getting-started/push-notifications/
    0 讨论(0)
  • 2021-01-04 04:06

    They use the Push API - https://developer.mozilla.org/en-US/docs/Web/API/Push_API Quoting from there:

    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
    foreground, or even currently loaded, on a user agent.

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