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:
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?
21 Answer
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.jsfile. 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:configin 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:configpage 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:
browser.link.open_newwindowType Integer
Default value3Description 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 between3and2.browser.link.open_newwindow.restrictionType Integer
Default value2Description 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.showPopupBlockerType Boolean
Default valuetrueDescription 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_delayType Integer
Default value1000Description 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_loadType Boolean
Default valuetrueDescription 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_flipType Boolean
Default valuetrueDescription Determines whether windows can be focused through JavaScript.
dom.disable_window_move_resizeType Boolean
Default valuefalseDescription 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.closedom.disable_window_open_feature.locationdom.disable_window_open_feature.menubardom.disable_window_open_feature.minimizabledom.disable_window_open_feature.personalbardom.disable_window_open_feature.resizabledom.disable_window_open_feature.scrollbarsdom.disable_window_open_feature.statusdom.disable_window_open_feature.titlebardom.disable_window_open_feature.toolbar
dom.disable_window_status_changeType Boolean
Default valuetrueDescription When enabled, prevents the status bar text from being changed via JavaScript.
dom.popup_allowed_eventsType String
Default valuechange click dblclick mouseup reset submit touchendDescription 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_maximumType Integer
Default value20Description Limits the number of simultaneously open pop-up windows.
privacy.popups.disable_from_pluginsType Integer
Default value2Description Controls pop-ups created by plug-ins (e.g. Adobe Flash Player). Possible values:
0- no restrictions.1- limits the pop-ups number todom.popup_maximum.2- block all pop-ups except for whitelisted websites.3- block all pop-ups.
privacy.popups.policyType Integer
Default value1Description Deprecated. Use
dom.disable_open_during_loadinstead.privacy.popups.showBrowserMessageType Boolean
Default valuetrueDescription 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.usecustomType Boolean
Default valuetrueDescription 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.
browser.link.open_newwindow;3
browser.link.open_newwindow.restriction;0
browser.popups.showPopupBlocker;true
dom.disable_open_click_delay;1000
dom.disable_open_during_load;true
dom.disable_window_flip;true
dom.disable_window_move_resize;true
dom.disable_window_open_feature.close;true
dom.disable_window_open_feature.location;true
dom.disable_window_open_feature.menubar;true
dom.disable_window_open_feature.minimizable;true
dom.disable_window_open_feature.personalbar;true
dom.disable_window_open_feature.resizable;true
dom.disable_window_open_feature.scrollbars;true
dom.disable_window_open_feature.status;true
dom.disable_window_open_feature.titlebar;true
dom.disable_window_open_feature.toolbar;true
dom.disable_window_status_change;true
dom.popup_allowed_events;
dom.popup_maximum;20
privacy.popups.disable_from_plugins;2
privacy.popups.policy;1
privacy.popups.showBrowserMessage;false
privacy.popups.usecustom;trueFurther reading
- Pop-up blocker settings, exceptions and troubleshooting
- A brief guide to Mozilla preferences
- about:config
- about:config entries