How does Facebook send notifications without tab

后端 未结 2 1080
爱一瞬间的悲伤
爱一瞬间的悲伤 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条回答
  •  旧时难觅i
    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.

提交回复
热议问题