Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For the past 5-10 years or so, I've been using Firefox, and I've never found out how to properly disable popups. I am now using Firefox 24.2.0 on Linux without Flash or Java. I used to just disable JavaScript, which seemed to work (at least for sites that don't need JavaScript), but new versions of Firefox remove that feature. I find the dominating time I waste during any day is on closing popup windows. I typically get 10-500 popups per day. I've heavily used some 40 computers over the last years, all with various versions of Linux and Windows, and in various locations (home/work/school) and I've always had the same problem. So it doesn't seem to be a malware issue.

All these years, I always checked the "Block pop-up windows" button: enter image description here

But it seems this doesn't do what I want it to. For example this page just showed a popup window when I clicked on the description. Also this page shows a popup when I click on the description or file name. I sometimes even get pages that show 4-10 popup windows.

Maybe I'm using the wrong option to disable popups? What does this option that I turned on actually do?

share|improve this question
Would blocking all popups by default work for you? And then manually adding exceptions for safe/required websites? – and31415 Feb 15 '14 at 0:01
@and31415: Indeed, that would work, my question is exactly asking how to do that. – Dog Feb 21 '14 at 19:07
up vote 3 down vote accepted

Firefox settings

Many settings, especially the most advanced ones, are not present in the User Interface (UI) options dialog.

Preference settings that are modified from default values are saved in the prefs.js file. Instead of directly editing this file, recent Mozilla applications include a configuration editor that can be accessed from the application interface.

Source: Editing configuration

In Firefox, type about:config in the Location Bar (address bar) and press Enter to display the list of preferences [...]. If you see a page with the warning message, "This might void your warranty!", click the button labeled "I'll be careful, I promise!", to continue (in fact, there is no warranty whatsoever, it's more a joke to ensure that users are aware of what they are about to do). Use the checkbox there to avoid the warning in the future.

To add a new preference, context-click (right-click) anywhere in the list of preferences. In the context menu, select New then select the type of preference you are adding.

To modify an existing preference, context-click (right-click) on the preference, select Modify and type in the new value.

To reset a preference to its default value or to remove an added preference, context-click (right-click) on the preference and select Reset.

You can use the Search bar at the top of the about:config page to filter the preferences that you want to inspect. The search bar is case-insensitive, unlike the actual configuration variables.

Source: about:config

Pop-up related preferences

Here's a comprehensive list I've come up with:


    Type Integer
    Default value 3

    Description Controls where to open links that would normally open in a new window. Possible values:

    • 1 (or anything else) - open in the current tab or window.
    • 2 - open in a new window.
    • 3 - open in a new tab.

    Enabling or disabling the Open new windows in a new tab instead UI option will toggle this preference between 3 and 2.


    Type Integer
    Default value 2

    Description Restricts all new windows opened by JavaScript. Possible values:

    • 0 - always force new windows into tabs.
    • 1 - don't restrict new windows.
    • 2 - force windows that don't specify their features (e.g. width, height) into tabs.

  • browser.popups.showPopupBlocker

    Type Boolean
    Default value true

    Description Determines whether to show an icon in the status bar when a pop-up has been blocked. Obsolete, just leave it as-is.

  • dom.disable_open_click_delay

    Type Integer
    Default value 1000

    Description Handles pop-ups according to the current pop-up blocker settings when created through a JavaScript timing event using a delay smaller than this value (in milliseconds).

  • dom.disable_open_during_load

    Type Boolean
    Default value true

    Description When enabled, blocks pop-ups created while the page is loading. This setting is equivalent to the Block pop-up windows UI option.

  • dom.disable_window_flip

    Type Boolean
    Default value true

    Description Determines whether windows can be focused through JavaScript.

  • dom.disable_window_move_resize

    Type Boolean
    Default value false

    Description Determines whether windows can be moved or resized using JavaScript.

  • dom.disable_window_open_feature.*

    Description Rather than a single preference, this is a set of different boolean settings which can prevent a specific pop-up feature (e.g. address bar, scroll bars, etc.) from being disabled when set to true. Available preferences:

    • dom.disable_window_open_feature.close
    • dom.disable_window_open_feature.location
    • dom.disable_window_open_feature.menubar
    • dom.disable_window_open_feature.minimizable
    • dom.disable_window_open_feature.personalbar
    • dom.disable_window_open_feature.resizable
    • dom.disable_window_open_feature.scrollbars
    • dom.disable_window_open_feature.status
    • dom.disable_window_open_feature.titlebar
    • dom.disable_window_open_feature.toolbar

  • dom.disable_window_status_change

    Type Boolean
    Default value true

    Description When enabled, prevents the status bar text from being changed via JavaScript.

  • dom.popup_allowed_events

    Type String
    Default value change click dblclick mouseup reset submit touchend

    Description A space-separated list of the events allowed to create pop-ups. Although undocumented, setting the value to a single space character will create an empty list, thus disabling all pop-ups (exceptions still apply). The same effect can be achieved by specifying a non-existent event (e.g. none).

  • dom.popup_maximum

    Type Integer
    Default value 20

    Description Limits the number of simultaneously open pop-up windows.

  • privacy.popups.disable_from_plugins

    Type Integer
    Default value 2

    Description Controls pop-ups created by plug-ins (e.g. Adobe Flash Player). Possible values:

    • 0 - no restrictions.
    • 1 - limits the pop-ups number to dom.popup_maximum.
    • 2 - block all pop-ups except for whitelisted websites.
    • 3 - block all pop-ups.

  • privacy.popups.policy

    Type Integer
    Default value 1

    Description Deprecated. Use dom.disable_open_during_load instead.

  • privacy.popups.showBrowserMessage

    Type Boolean
    Default value true

    Description Determines whether to display an information bar whenever one ore more pop-us are blocked. Can be changed by using the Don't show info bar when pop-ups are blocked UI option.

  • privacy.popups.usecustom

    Type Boolean
    Default value true

    Description Apparently unused.

Recommended settings

These are the values I currently use for the settings listed above; feel free to experiment with other settings on your own. Tested with Firefox 27.0.1.;3;0

Further reading

share|improve this answer
Setting dom.popup_allowed_events to a space worked. Other things I tried that didn't work: made the mediafire page open about:blank in a new window and the current page change to about:blank as well; The pirate bay would open a popup and it would immediately close. worked (made the popups show in a new tab). dom.disable_open_click_delay=90000, dom.popup_maximum=0, and dom.popup_maximum=1 didn't seem to change anything. – Dog Apr 12 '14 at 8:46
I created and linked a Superuser account just so that I could upvote the original question and your excellent answer. I've used it to configure at least five installations of Firefox so far. Based on your answer, the process which works for me is really short. Go to: about:config. Set and dom.popup_allowed_events=''. It works beautifully! – DaveGauer Jul 24 '14 at 0:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .