Both Firefox and Chrome support the Push API.
Currently Firefox adhere to the standard, while Chrome uses an hybrid solution (Push API + GCM).
Basically you have to:
- collect the endpoint (device token) and register a service worker (a snippet of code that will be executed later) using Javascript and the Push API
- store the endpoint to the server
- when something happens, from your backend you send the notifications to the browser manufacturer's service
- the browser manufacturer's service delivers the notification to the browser (which has a permanent connection to it)
You can read this tutorial for Chrome and the Push API reference by MDN.
If you prefer a third party service I suggest the one I have developed: https://pushpad.xyz