为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How to stop the webpush notifications

more options

Every time I open Firefox, a box with "Would you like to receive notifications from this site?" appears. When I click on "learn more" it comes up as a Webpush notification. The sequence of directions to supposedly remove this (Options..Content..Notification...Remove site)..is not helpful as no sites are listed to remove. Ironically, in your description of webpush notifications, you state it is an "optional feature" and that you "only receive messages from sites for which you have granted permission." Apparently not, since I not only have not granted permission, but I "opt" to not receive this, but seem to have no choice at this point.

Every time I open Firefox, a box with "Would you like to receive notifications from this site?" appears. When I click on "learn more" it comes up as a Webpush notification. The sequence of directions to supposedly remove this (Options..Content..Notification...Remove site)..is not helpful as no sites are listed to remove. Ironically, in your description of webpush notifications, you state it is an "optional feature" and that you "only receive messages from sites for which you have granted permission." Apparently not, since I not only have not granted permission, but I "opt" to not receive this, but seem to have no choice at this point.

被采纳的解决方案

What site is it?

When you receive the drop-down panel, what permission are you choosing? Please see the attached screen shot to see what I mean.

Firefox records site-specific permissions for notifications:

  • "Always Ask" - triggered by the site requesting permission to set up notifications (this is the default and remains in effect if you simply close the panel or click Not Now)
  • Allow - the site can set up notifications without asking again
  • Block - the site cannot set up notifications and Firefox shouldn't bother asking

After you interact with the drop-down panel, you can confirm the current setting or modify it using the Permissions panel of the Page Info dialog. You can call that up using any of these:

  • right-click a blank area of the page and choose View Page Info > Permissions
  • (menu bar) Tools menu > Page Info > Permissions
  • click the padlock or "i" icon to the left of the site address, then the ">" icon, then More Information > Permissions

Scroll down to "Receive Notifications" and you can uncheck the "Use default" box and select the permission you prefer.

There's no save button for this panel, changes are saved as you go.

Now... this permission is part of a category of data called Site Preferences. If you have Firefox set to clear your history at shutdown, that feature has a checkbox for whether to clear the Site Preferences along with the other data. Don't clear the site preferences.

定位到答案原位置 👍 2

所有回复 (7)

more options

Hi   !
Very annoying,   but this should put an end to it:
Visit  "about:config"   page,   then: search for:   "dom.webnotifications.enabled",
and set it's value to   'false'.

This will completely disable push notifications and   Firefox   won't ask your permission again.
Let us know if it worked,   will you   ?

more options

选择的解决方案

What site is it?

When you receive the drop-down panel, what permission are you choosing? Please see the attached screen shot to see what I mean.

Firefox records site-specific permissions for notifications:

  • "Always Ask" - triggered by the site requesting permission to set up notifications (this is the default and remains in effect if you simply close the panel or click Not Now)
  • Allow - the site can set up notifications without asking again
  • Block - the site cannot set up notifications and Firefox shouldn't bother asking

After you interact with the drop-down panel, you can confirm the current setting or modify it using the Permissions panel of the Page Info dialog. You can call that up using any of these:

  • right-click a blank area of the page and choose View Page Info > Permissions
  • (menu bar) Tools menu > Page Info > Permissions
  • click the padlock or "i" icon to the left of the site address, then the ">" icon, then More Information > Permissions

Scroll down to "Receive Notifications" and you can uncheck the "Use default" box and select the permission you prefer.

There's no save button for this panel, changes are saved as you go.

Now... this permission is part of a category of data called Site Preferences. If you have Firefox set to clear your history at shutdown, that feature has a checkbox for whether to clear the Site Preferences along with the other data. Don't clear the site preferences.

more options

Appreciate the responses. Not sure how to do what you're suggesting. Jscher2000...You asked "what permission are you choosing" My options when the box appears are..."receive for this session" or "not now." None of the responses you mentioned are there. As for the padlock or "i", it is grayed out and when I click on it, it says "you have not granted this site any special permissions." To Happy112...would love to try what you are suggesting, but am not certain where the "about:config" page is that you suggest. Hope you won't give up on me! I will follow your instructions, but I need a bit of a head start. thanks

more options

Hi jaz103151, I don't know why you don't get the Always Allow and Always Block options. Could you try using the Permissions panel of the Page Info dialog as I mentioned and see whether it offers those options?

more options

jaz103151 said

To Happy112...would love to try what you are suggesting, but am not certain where the "about:config" page is that you suggest. Hope you won't give up on me! I will follow your instructions, but I need a bit of a head start. thanks

Sorry,   I should have said:
Type in the address bar/URL bar:   "about:config"
then search for:
"dom.webnotifications.enabled"
and set it's value to   'false'
Would you give it a try and let us know if it worked for you   ? If it doesn't,  I'll leave you in the capable hands of   jscher2000,    -     we're not giving up on you   !

more options

Thank you Happy112!

I disabled both dom.webnotifications.enabled, and dom.webnotifications.serviceworker.enabled (both set to false).

Hopefully this will be a long-term fix until Mozilla decides all users should be annoyed with whatever mandatory bells & whistles are in the pipeline.

I'm surprised the "Do not disturb me" option (Options, Content, Notifications) is apparently only by session, resetting to unchecked upon closing and reopening Firefox. Makes no sense.

Thanks again.

more options

Since this seems to be a hot topic today, I'll paste in a more detailed summary.

Not every notification request is for a "push" notification, which is causing confusion for people looking for the solution.

  • Regular notifications end when you close the last tab for a site.
  • Web push notifications keep a connection to the site in the background so you can get notifications even after the last tab for the site is closed (until you exit Firefox).

Site-Specific Permissions/Blocks

If the drop-panel is not available or does not work for you, while viewing the problem site, you can change the notifications permission using the Permissions panel of the Page Info dialog. To call that up, either:

  • right-click a blank area of the page and choose View Page Info > Permissions
  • (menu bar) Tools menu > Page Info > Permissions
  • click the padlock or "i" icon to the left of the site address, then the ">" icon, then More Information > Permissions

Scroll down to "Receive Notifications" and you can check the "Use default" box (so you are prompted in the future) or uncheck that box and select the permission you prefer (for example, Block).

There's no save button for this panel, changes are saved as you go.

Session Do Not Disturb

To disable all desktop notifications for the rest of your Firefox session (i.e., until you exit Firefox), you can turn on "Do Not Disturb" on the Options/Preferences page, Content panel. Either:

  • Windows: "3-bar" menu button (or Tools menu) > Options, then in the left column click Content
  • Mac: "3-bar" menu button (or Firefox menu) > Preferences, then in the left column click Content
  • Linux: "3-bar" menu button (or Edit menu) > Preferences, then in the left column click Content
  • Anyone: Type or paste about:preferences#content in the address bar and press Enter/Return (you can bookmark this for faster future access)

On the right side, under "Notifications", check the "Do not disturb me" box.

All-Site Persistent Disable

There are two different preferences for notifications, a master switch, and one which is specific to background (web push) notifications that can appear after you leave the site which sends them.

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste webno and pause while the list is filtered

(3) To disable PUSH NOTIFICATIONS, double-click the dom.webnotifications.serviceworker.enabled preference to switch its value from true to false -- sites can still generate desktop notifications while you have a tab open to the site

(4) To disable ALL NOTIFICATIONS, double-click the dom.webnotifications.enabled preference to switch its value from true to false -- this is a master switch, you won't get any desktop notifications from sites

Hopefully that gives you a technique for managing notifications to fit your needs.


Site-Specific Permissions Are Forgotten?

Whether you enter a site permission through a drop-panel or the Page Info dialog, Firefox should remember your choice. If you are losing site-specific permissions, one possible reason is if Firefox is set to "Clear history" when it closes on the Options/Preferences page.

If you use that setting, check to the right of it for a Settings button. Click that, and make sure that "Site Preferences" is not checked -- when that's checked, you'll lose all your Allow/Block settings every time you close Firefox.