DEV Community

Weather Clock Dash
Weather Clock Dash

Posted on

Firefox Notifications: Blocking Spam and Configuring Browser Alerts

Browser notifications are one of the most aggressively abused web features. Firefox handles them better than most browsers. Here's how to configure them and block the bad actors.

How Firefox Handles Notification Requests

By default, Firefox asks before allowing any site to send notifications. You see a permission prompt:
"Allow [site] to send notifications?"

Unlike some browsers that auto-prompt for every site you visit, Firefox's prompt appears only when a site explicitly requests permission.

Global Notification Settings

Settings → Privacy & Security → Permissions → Notifications → Settings

Here you can:

  • See all sites with notification permission (allowed or blocked)
  • Revoke permission from specific sites
  • Add sites to the block list manually
  • Enable "Block new requests asking to allow notifications" — this silently blocks all future permission requests without showing the prompt

The nuclear option: "Block new requests" is the most useful toggle. After clicking this, no site can ask for notification permission. You never see the prompt again. For most users, this is the right choice.

Blocking Notification Spam Domains

Some sites aggressively request notification permissions on first visit. Common culprits: news sites, games, and marketing sites.

To block a specific site permanently:

  1. When the notification prompt appears, click "Block" (or "Block for this session")
  2. Firefox adds it to the blocked list in Settings → Notifications

Or add to the blocked list in advance:
Settings → Privacy & Security → Permissions → Notifications → Settings → Add site → enter the domain.

The about:config Approach

For users who want more granular control:

dom.webnotifications.enabled — Set to false to disable the Web Notifications API entirely. Sites can't request notification permission at all — they don't even get the API. This is more private than just blocking requests (it doesn't reveal that you "blocked" them, it just returns no API support).

permissions.default.desktop-notification — Default permission behavior:

  • 0: Ask (default)
  • 1: Allow all
  • 2: Block all (silently, no prompt)

Setting to 2 is equivalent to the UI toggle but via about:config.

Notification Appearance

Firefox uses native OS notifications:

  • Windows: Uses Windows Toast notifications (appear in bottom-right, show in Action Center)
  • macOS: Uses macOS Notification Center
  • Linux: Uses libnotify/D-Bus (compatible with GNOME, KDE, and most notification daemons)

Appearance is controlled by OS settings, not Firefox settings.

Push Notifications vs Browser Notifications

Browser notifications (what this article covers): Shown when the browser is open; require explicit permission per site; are part of the Web Notifications API.

Push notifications: Shown even when the browser isn't open; require a service worker; are part of the Push API (built on Web Notifications). Firefox supports push notifications but they still require explicit notification permission.

For sites that want to send notifications even when the browser is closed (like email or calendar apps turned into PWAs), push notifications enable this. Firefox handles these securely — you can revoke them from the same notifications settings.

Notification Badging

Some sites use notification badging (a number badge on the browser icon or tab favicon). Firefox shows badging for tabs that have active notifications.

Firefox vs Chrome: Notification Behavior

A key difference: Chrome on Android automatically grants notification permissions to sites you've "installed" as PWAs. This is why Android Chrome users often receive aggressive notification spam from web apps they've never explicitly opted into.

Firefox doesn't have this behavior — notification permission is always explicit, regardless of how you access the site.

Practical Recommendations

For most users: Enable "Block new requests asking to allow notifications" in Settings → Notifications. This stops the constant prompts without you having to make individual decisions.

Exception: Keep notifications enabled for sites you genuinely want (calendar apps, messaging tools, etc.). Add those sites explicitly to the allowed list before enabling the global block.

For developers: Keep notifications enabled so you can test your web app's notification behavior. Use a separate Firefox profile for development to avoid polluting your personal notification settings.


Push notifications on the web are rarely worth the privacy trade-off. For most sites, "Block new requests" is the right setting. Save notification permissions for the 1-2 sites where you genuinely want real-time alerts.

Top comments (0)