Web Push notifications in Firefox

Revision Information
  • Revision id: 115196
  • Created:
  • Creator: Joni
  • Comment: push
  • Reviewed: Yes
  • Reviewed:
  • Reviewed by: heyjoni
  • Is approved? Yes
  • Is current revision? No
  • Ready for localization: No
Revision Source
Revision Content

Push notifications allow websites to inform users of new messages or updated content. While Firefox is open, websites who have been granted permissions can send notifications to your browser and may display notifications on the screen. Users can easily allow or disable notifications and control how these notifications appear.

Upgraded Notifications

Starting with version 44, Firefox can deliver on-screen notifications even when that site isn’t loaded. Using the Push API, a W3C standard, Firefox receives a push message and can show notifications (if permitted by the user) even if that site isn’t loaded. You can then choose whether or not to give permission for a site to send you notifications by following these instructions:

  1. Go to the Firefox menu New Fx Menu and select OptionsPreferences.
  2. Select the Content panel and click the Choose button under Notifications.
    push content panel 44
  3. Alternatively, click the options in one of the notifications you receive.
    push notification menu

What is Push?

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

For instance, you can subscribe to notifications from your favorite shopping websites which can notify you of new promotions or offers.. You can subscribe to notifications from sites like Ticketmaster which can notify you about new events or ticket sales, and weather sites can also use Push to notify you of an incoming storms.

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

How does it work?

Websites can install a service worker, a background web page with a limited set of functionality, that can subscribe to the Push service. The website can then send a push message through Mozilla service to your browser, which can process that message or decide to display a notification on screen.

push notification 44

Clicking the notification will take you directly to the updated website or focus the site in a tab if it’s loaded .

What information do I share with a site?

A web site that has been granted permissions, can send you push messages when the site isn’t loaded. A quota limits the number of push messages without on screen notification that sites can send you. Web sites that exceed the quota will have it’s push messaging disabled and the user must revisit the website again to resubscribe. Push does not directly allow websites to determine your IP address.

What information does Firefox use to provide Push?

Firefox maintains an active connection to a push service in order to receive push messages as long as it is open. The connection ends when Firefox is closed. 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 a combination of the Mozilla Push service and Google’s Cloud Messaging platform to deliver notifications to Firefox for Android.

In both cases,push messages are encrypted, per the IETF spec, only your copy of Firefox can decipher them. The encrypted messages are stored on the server until they are delivered or expire.

How do I revoke Push permissions?

Push is always opt-in in Firefox. A site cannot send you push messages without your permission. To stop a specific 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

To stop all sites from sending you push messages, follow the above steps except, instead of selecting a specific site, 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.

How do I add Push to my website?

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