Take Control of Popups in Firefox

,

By default Firefox comes with a popup blocker enabled that prevents popups from automatically opening, that is the ones that you don’t specifically request, but that open just because you visit a page. So that’s fine. That problem is solved. What is more annoying is legitimate popups that are actually useful, but which are very unfriendly. Heres how to tame them in Firefox.
Okay, so lots of sites make good use of popups to improve your user experience, such as showing a large version of a product picture without making you navigate away from the page with product information. That’s nice of them. Unfortunately, quite often lazy or stupid developers inadvertently make these popups incredibly annoying as well. You end up with a window open that is not resizeable, has no navigation, and is missing all sorts of information. In the least objectionable case, this means an image that is slightly cropped. More commonly, it means a page that is incomprehensible because you can’t read what’s there, can’t see even the important part of the image all at once, or worst of all, that has necessary links which then take you away to pages intended to be viewed in the full browser, but now you’re stuck in that little window. That has always annoyed me beyond reason, but I’m sort of a curmudgeon.
Another incredibly annoying behavior is when developers resize the window. This is not really their fault, but if you are using advanced tab management in Firefox with the excellent Tab Mix Plus extension, you have tremendous control over where popups open. Sometimes I have them open in a new tab. If the develop expects her popup to be standalone, it makes sense to size it just large enough to fit an image of known size, for example. That’s a nice feature. It just has a nasty effect on my browser when opened in a new tab, rather than a new window.

So I went hunting for Firefox extensions that would save me from this aggravation and found that you can strike back at these miscreant web developers using built-in settings in Firefox. Hooray!

First, let’s just stop this nonsense of letting other people decide how big my main browser window should be. They can still set windows to open at a certain size, but resizing an existing window will not work with this simple tip. In Firefox, in the top menu bar, go to Tools » Options.. » Content and click on the first Advanced button, not the Advanced tab or the second Advanced button in that panel (talk about good UI design).

Firefox Advanced Content options screen

Now you’re in the Advanced Javascript Settings window. Just uncheck them all. I don’t see any reason to let a script on a web page do anything for me. If I really need to resize my window, for example, I’ll do it myself thank you very much.

Advanced Javascript Settings Dialog Box

Now we come to the case, though, where the developer has not created a resizable popup window, so I can’t resize it and, as often as not, can’t use that page at all. Nice design buddy. But, again, Firefox comes to the rescue. Up on the address bar (i.e. where you normally type http://raisedbyturtles.com, or would if you didn’t already get updates via the RSS feed or email), you enter the Firefox configuration screen by entering about:config and hitting the enter key (in other words, no http or anything like that, just about:config). This will bring up thousands of options. To pare down the list to what we want, down where it says “Filter” type in dom.disable_window_open_feature. Now you have a list of just the features you want. Double-click on any line to toggle that feature between true and false.

Firefox configuration defaults

You can have your pick of which options you want to change and which you don’t. This is working pretty well for me:

Firefox popup friendly settings

You can see a full write-up on those features on the Firefox tips page, but these are the ones we care about:

dom.disable_window_open_feature.resizable
Set this to true to make sure all pop-up windows are resizable.
dom.disable_window_open_feature.minimizable
Set this to true to make sure all pop-up windows are minimizable.
dom.disable_window_open_feature.menubar
Set this to true to always display the menu in pop-up windows.
dom.disable_window_open_feature.location
Set this to true to always display the Navigation Toolbar in pop-up windows.
dom.disable_window_open_feature.scrollbars
Set this to true to prevent sites from disabling scrollbars.

Enjoy better surfing without those annoyances!

12 Responses to “Take Control of Popups in Firefox”

  1. This was exactly what I was looking for. You’ve saved me a lot of annoyance. Thanks!

  2. Thanks JH. It’s always nice to know that someone is actually getting something useful out of this. I much appreciate the feedback (even negative if need be!)

  3. Perfect! This has bugged me since the first stupid pop-up window. Thanks!

  4. but how can we setup these things at client side because you can’t don these settings with all client computers.there should be a way out to do that through window.open() resiable parameter.

  5. Yes, you can do it as a developer. All you need to do is build your window correctly and set it to be resizable, have scroll bars and all that nice stuff.

    The problem is that as an individual surfing the net, many developers don’t bother to create usable pop-ups.

    From the developer side, you can learn everything you need to know about popups over at QuirksMode.org:
    http://www.quirksmode.org/js/popup.html

  6. Thank You! Google analytics was really begining to get on my nerves by creating popups without scroll bars.

  7. The newest version of Fx (starting with 23.0, which is the current Aurora channel (pre-Beta, post-Alpha) seems to have dropped the enabling / disabling of javascript in the options panel.

    See http://news.softpedia.com/news/Firefox-23-Removes-Unused-or-Dangerous-Preferences-from-the-Options-Dialog-344744.shtml for more info, and http://news.softpedia.com/newsImage/Firefox-23-Removes-Unused-or-Dangerous-Preferences-from-the-Options-Dialog-2.png/ for a side by side comparison.

    This is the BugZilla bug created that would lead to eventual UI redesign: https://bugzilla.mozilla.org/show_bug.cgi?id=851702

    And this is the Aurora report showing the implemented change: http://www.mozilla.org/en-US/firefox/23.0a2/auroranotes/ (See the second “changed” item).

    The DOM items are still in there, but interestingly enough, dom.disable_window_open_feature.resizable is now default to true (In Fx nightly 24.0a1).

    Searching through about:config, I did not, however, see any way to effect the same settings as in the original UI for advanced JS options.

    Your thoughts?

  8. JLG – I’m still on the current release (21) so I don’t have to deal with this yet, but I believe the setting from the UI is

    dom.disable_window_resize

    If you double click that and set to true, that’s that same as unchecking the box via the UI. I know that sounds backwards, but you’re disabling scripts’ ability to resize the window, which actually protects your ability to do so.

    Anyway, that should be available in FF 23, it just isn’t through the UI, so you have to

    – type about:config into the browser bar
    – filter on resize
    – find the above mentioned item and double click.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>