Web Push notifications in Firefox

Firefox Firefox Last updated: 14 hours ago 25% of users voted this helpful

Web Push allows websites to notify you of new messages or updated content, even when the site is not loaded. While Firefox is open, websites that have been granted permission can send notifications to your browser, displaying them on the screen. Clicking a notification can open the original website or switch to that site’s tab if loaded.

Firefox_150_web-push-notification_win10_pushfooFirefox_150_web-push-notification_win11_pushfooFirefox_150_web-push-notification_fedora_pushfooFirefox_150_web-push-notification_mac_pushfoo

For example, you can subscribe to notifications from your favorite shopping sites that can notify you of new promotions or offers. You can subscribe to notifications from different websites. A concert site may offer you notifications for shows of your favorite band. You decide to allow that site to notify you, and a week later you get a notification that your band is on tour.

Remember: You will only receive notifications from sites that you have granted permission. You can revoke this permission at any time.

How do websites request the notifications permission?

If a site wants to request the permission, you will see the Notification permission Notifications icon icon in the address bar. Clicking it will display a pop-up allowing you to grant or deny the permission.

Push_notificationsFx149PushNotifications

If you have interacted with the website (pressing a key on your keyboard or tapping/clicking anywhere on the site), the pop-up will display automatically.

Note: Sites with this permission can also use Push API to update data in the background, even without showing you a notification.

Manage the notifications permission for a website you are accessing

  1. Click the padlock icon Fx89Padlockshield icon Fx149UnifiedTrustIcon-Secure on the left side of the address bar.
  2. Click the Connection > button inat the top of the Site Information panel that opens.
  3. Click More site informationMore information in the next panel to bring up the Page Info window.
    • Tip: You can also open the Page Info window from the Menu bar, if the Menu bar is enabled. Click Tools and select Page Info from the drop-down menu.
  4. Select the Permissions tab.
  5. Under Send Notifications, choose a notification option: Always Ask (default), Allow or Block. If your choices are grayed out, deselect the Use Default checkbox.

Manage the notifications permission for all websites

  1. In the Menu bar at the top of the screen, click Firefox and select Settings (or Preferences, in some cases).Click the menu button Fx89menuButton and select Settings.
  2. Select Privacy & SecurityPermissions and data on the left.
  3. Scroll to the Permissions section.
  4. Click the Settings… button to the right of Notifications.
  5. Select Allow or Block from the Status drop-down for any of the websites to grant or deny the notifications permission. Note that selecting Block will prevent the website from requesting the permission again.
  6. To deny the notifications permission, while allowing the website to request it again in the future, select the site and click the Remove Website button under the list.
  7. Once you're done, click the Save Changes button.

How do I revoke the notifications permission for a specific site?

Web Push is always opt-in in Firefox. A site cannot send you push notifications without your permission. To stop a specific site from sending you notifications:

  1. In the Menu bar at the top of the screen, click Firefox and select Settings (or Preferences, in some cases).Click the menu button Fx89menuButton and select Settings.
  2. Select Privacy & SecurityPermissions and data on the left.
  3. Scroll to the Permissions section.
  4. Click the Settings… button to the right of Notifications.
  5. Select the website.
    • If you just want to revoke the permission (while allowing the website to request it again in the future), click the Remove Website button.
    • If you want to revoke the permission and prevent the website from requesting it again, select Block from the Status drop-down next to the website URL.
  6. Click the Save Changes button.
Note: To stop all sites from sending you push messages, follow the steps above, but instead of selecting a specific site, click the Remove All Websites button. After that, websites will not be able to send you notifications and will need to ask your permission to send them in the future.

Alternatively:

  1. Visit the website you want to revoke the notifications permission for.
  2. Click the Permissions icon Fx89PermissionsIcon in the address bar to bring up the Site Permissions panel for the website.
  3. Find the Send Notifications permission and click the Allowed ✕ button next to it to remove the permission.

You can also deny the permission in the Page Info window as described in the Manage the notifications permission for a website you are accessing section.

How do I stop Firefox from asking me to allow notifications?

If a site indicates to Firefox that it wants to show notifications, by default, Firefox asks whether you want to grant permission. You can set Firefox to automatically deny permission without asking. Even after the change, you will be able to make exceptions for sites you want to show notifications or use push features via the Page Info window.

  1. In the Menu bar at the top of the screen, click Firefox and select Settings (or Preferences, in some cases).Click the menu button Fx89menuButton and select Settings.
  2. Select Privacy & SecurityPermissions and data on the left.
  3. Scroll to the Permissions section.
  4. Click the Settings… button to the right of Notifications.
  5. Select the Block new requests asking to allow notifications checkbox.
  6. Click the Save Changes button.

Frequently asked questions

How does Web Push 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’s Web Push service to your browser, which can process that message and display a notification on your screen.

What information do I share with a website?

A website that has been granted permissions can send you push messages when the site is not loaded. A quota limits the number of push messages without an on-screen notification that websites can send you. Websites that exceed the quota will have their push messaging disabled, and you will have to visit them again to resubscribe. Web Push does not directly allow websites to determine your IP address.

What information does Firefox use to provide Web 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. We store a randomized identifier (User Agent IDentifier or UAID) on our server for your browser, along with a random client-generated identifier for each push subscription. When you have any subscriptions, the UAID is required to allow our push service to route incoming messages to Firefox. If you don't have any active push notification subscriptions, Firefox rotates the UAID on each new connection.

On Firefox for desktop, the push service is operated by Mozilla. Firefox for Android uses a combination of the Mozilla Web Push service and Google’s Cloud Messaging platform to deliver notifications to Firefox for Android. Only Mozilla's applications are enabled to use WebPush on iOS (third parties are prohibited from using WebPush to send notifications to iOS per the iOS usage agreement).

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

We store your IP address for 90 days as part of this service. The stored information is invalidated when either the IP Address or UAID is changed. We do not store information about:

  • the servers and/or services that have sent messages
  • when a particular user agent was online/active

How do I add Web Push to my website?

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

These fine people helped write this article:

Illustration of hands

Volunteer

Grow and share your expertise with others. Answer questions and improve our knowledge base.

Learn More