- Go to facebook and allow HTML5 Desktop Notification for it.
- Close facebook tab.
- Ask somebody to write you message on facebook.
Now u see the notification from facebook while facebook site isn't open. HOW?
Now u see the notification from facebook while facebook site isn't open. HOW?
Facebook uses the Push Notifications 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:
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.