[Tip] How to Block All Unwanted Website Pop-ups in Mozilla Firefox

When we are working online and going through various websites, we find many websites launching annoying pop-up ads. Most of these websites are low-quality websites and blogs. Sometimes the pop-up ads are opened when you click on a link but the most irritating thing happens when pop-up ads are opened automatically when you click anywhere on the webpage. For example, you click on some text to select it, you click on next page link, you click on search button to search for something. It doesn’t matter what you are doing, some websites always throw unwanted pop-up ads. Many times lots of pop-ups are opened automatically which might also contain malware and can infect your PC.

Website_Popup_Ads.png

Normal text/image ads are not annoying and are acceptable as they don’t harm and website owners like me earn some money from these ads to be able to maintain and run our websites but pop-up ads become very annoying to the visitors.

Advertisement

I found that Internet Explorer properly blocks all pop-up ads on all websites if we set the blocking level to high in Internet Options. But other browsers fail sometimes in blocking pop-up ads.

If we talk about Mozilla Firefox web browser, it also comes with built-in pop-up blocker but its very basic in features and can’t block all kind of pop-up ads. It happens because the developers allow some events that can throw pop-ups on websites in Firefox. Its done to allow websites to function properly as many websites might require pop-ups to show results, etc. So Firefox does allow some pop-ups even if you set the pop-up blocker to block pop-ups.

But there is a hidden preference present in Firefox’s hidden secret advanced configuration page i.e. about:config page which can be used to make the Firefox’s built-in pop-up blocker stronger and perfect.

After modifying this preference, you can force Firefox to block all kind of pop-ups and you’ll never have to close any annoying extra pop-ups on any website.

If you also want to block all kind of pop-ups including pop-up ads in Mozilla Firefox, following steps will help you:

NOTE: This method will work in all Firefox versions as well as other browsers based on Firefox such as Pale Moon, Waterfox, etc.

1. Open Mozilla Firefox and type about:config in the addressbar and press Enter. It’ll show you a warning message, click on “I accept the risk!” button.

Advertisement

2. Now type dom.popup in Search filter box and it’ll show following preference in the window:

dom.popup_allowed_events

This preference is responsible for telling Firefox which events should be allowed to throw pop-ups. The default value of this preference is set to as following:

change click dblclick mouseup pointerup notificationclick reset submit touchend

3. If you want to block all kind of pup-ups in Firefox, double-click on the preference and empty its value i.e. delete everything from its value text box.

Block_Popup_Ads_Mozilla_Firefox.png

If you don’t want to disable all pop-ups but want to disallow a few selected pop-ups, you can remove the desired event from the value field. For example, you can remove click and dblclick events from the value to block pop-ups which appear when you click or double-click on web pages.

That’s it. Now try to open any website which used to throw pop-up ads and now all pop-ups will be blocked immediately. For your convenience, Firefox will show a notification bar with the message “Firefox prevented this site from opening a pop-up window” at the top letting you know about the blocked pop-up.

Firefox_Blocking_Popup_Ads_Notification_Bar.png

You can click on “Options” button given at the right-side of the notification bar to show the blocked pop-up, to always allow pop-ups from that particular website, to edit pop-up blocker options or to hide the notification bar when a pop-up is blocked.

If you regularly visit a particular website and if you don’t have problem with its pop-up, you can select first option to allow pop-ups from that website.

PS: In future if you want to restore default pop-up blocker settings, simply restore default value of the preference in about:config page as mentioned in step 2. Alternatively, you can right-click on “dom.popup_allowed_events” preference and select “Reset” option to restore the default value.

Also Check:

[Tip] Restore Pop-up Window Blocked Notification Message in Mozilla Firefox

Published in: Mozilla Firefox

About the author: Vishal Gupta (also known as VG) has been awarded with Microsoft MVP (Most Valuable Professional) award. He holds Masters degree in Computer Applications (MCA). He has written several tech articles for popular newspapers and magazines and has also appeared in tech shows on various TV channels.

Comments

NOTE: Older comments have been removed to reduce database overhead.

  1. This was the best answer! Thank you! If you are at a website that constantly introduces pop-up tabs, the following will take care of them:

    go to about:config

    go to dom.popup_allowed_events

    dele the following:

    change click dblclick mouseup pointerup notificationclick reset submit touchend

Leave a Comment

Your email address will not be published. Required fields are marked *

NOTE: Your comment may not appear immediately. It'll become visible once we approve it.