Web Push notifications in Firefox

Revision Information
  • Revision id: 108073
  • Created:
  • Creator: Joni
  • Comment: added hidden note for contributors
  • Reviewed: Yes
  • Reviewed:
  • Reviewed by: heyjoni
  • Is approved? Yes
  • Is current revision? No
  • Ready for localization: No
Revision Source
Revision Content

Websites you use with Firefox can send you notifications in the background that can appear on screen or update the web page. You can control how these notifications appear and work.

Upgraded Notifications

Firefox has delivered on-screen notifications to open web pages for the last several releases. With Firefox 44, users can receive notifications associated with a web page even if they navigate away from the site or close the tab via a mechanism called Push. With Push, sites can update data in the background even without showing you a notification. If you already gave permission to a site to send notifications, these sites will also be able to use this Push mechanism. If you wish to change your notification preferences, go to the Firefox menu New Fx Menu, select OptionsPreferences, select the Content panel and click the Choose button under Notifications. Alternatively, click the options in one of the notifications you receive.

What is Push?

Push is an optional feature that allows websites to send you messages even when you aren’t visiting the site. Sites can use this feature to provide you with notifications or update data in the background.

For instance, a webmail site might use Push to provide you with a notification when new messages arrive, or a weather site might use Push to provide storm alerts.

You will only receive messages from sites for which you have granted permission.

How does it work?

Firefox maintains a connection to a push service. Sites that you have granted permission for Push can use the service to send you messages. Firefox delivers this push message to a small piece of JavaScript called a “worker”. The worker then processes the message. It might decide to show a visual notification or store the message for later use.

What information do I share with a site?

A site can use Push to send you a message at any time, even when you are not actively visiting it. A site that sends you a message can learn your IP address if it chooses to do so; this could reveal your location.

What information does Firefox use to provide Push?

Firefox maintains a permanent connection to a push service in order to receive push messages. On our server we store a randomized identifier for your browser, along with a randomized identifier for each site you authorize.

On Firefox for desktop, the push service is operated by Mozilla. Firefox for Android uses the same Google Cloud Messaging platform and infrastructure that your other Android applications use.

In both cases, the push service cannot decrypt your push messages. Push messages are encrypted, only your copy of Firefox can decipher them. The encrypted messages are stored on the server until they are delivered.

How do I revoke Push permissions?

To stop a site from sending you push messages:

  1. Go to the Firefox menu New Fx Menu and select OptionsPreferences
  2. Select the Content panel and click the Choose button under Notifications
  3. Select the site
  4. Click Remove Site

How do I disable Push permanently?

Push is always opt-in in Firefox. A site cannot send you push messages without your permission. If you wish to disable the feature completely, please follow these steps:

  1. Go to the Firefox menu New Fx Menu and select OptionsPreferences
  2. Select the Content panel and click the Choose button under Notifications
  3. Click Remove All Sites

Websites will not be able to send you messages and will need to ask your permission to send them in the future.

Will this cost me money?

Push uses a small amount of data to operate. If you’re on a small data allowance, or are charged for any data usage, you may wish to monitor your usage.

How do I add Push to my website?

The Push API specification explains how to create a Service Worker and send push messages.