Send desktop notifications in Chrome or Firefox from a closed web app?

Solution 1:

You can send push notifications even when your web page is not active using Service Workers, the Notification API for service workers and the push API for server-initiated notifications (or scheduled notifications).

As of June 2016, Service Workers are supported in Chrome, Firefox and Opera. See the status at https://jakearchibald.github.io/isserviceworkerready/

See the following links for related discussions, status of implementation and specifications.

  • Service workers are enabled by default since Chrome 40, Firefox 33, and Opera 24. See the HTML5Rocks tutorial and MDN.
  • Push notifications: Chrome 42+, Firefox 44+