Skip to content
Browse files
added article on window open features
  • Loading branch information
binfalse committed Mar 5, 2020
1 parent 3347e73 commit df884dff0b1cc50f1565fc062d83b039a495dab7
Showing with 110 additions and 0 deletions.
  1. +110 −0 _posts/
@@ -0,0 +1,110 @@
title: "Window Open Features: Restrict and Test"
layout: post
published: true
date: 2020-03-05 08:33:11 +0100
- administration
- config
- howto
- javascript
- html
- programming
- software
- website
- web
- javascript
- mozilla
- demo
- config
- firefox
- programming
- trick
- userinteraction
- web

Are you also annoyed by websites that open popups and external windows without your menu bar? And without scrollbars and no close button and ... and .. and..

## Restrict Window Open Features

Don't worry, you can disable these "features"!
In Firefox, open [about:config](about:config) and search for `dom.disable_window_open_feature` (see [@azure's pleroma post](
Full documentation on these settings are available through [MozillaZine](
These preferences can also be [set (and locked) system wide](, which may be useful for multi-user and multi-system environments

## Test Window Open Features

[Mozilla's Developer portal has a documentation on possible Window Open Features](
There you can learn which features are available, what they mean, and how to set them.

Testing is then pretty easy.
The following checkboxes allow for enabling/disabling most useful window features.
If a box is ticked, the corresponding feature will be set; if it's unticked the feature will be turned off.
You can then click the link below to test how your browser behaves when opening this blog using the chosen set of features.

<ul id="settings">

<script type="text/javascript">
var ul = document.getElementById("settings");
var windowRef = null;
var settings = {
"menubar": "Menu Bar",
"toolbar": "Navigation Toolbar (Back, Forward, Reload, Stop...)",
"scrollbars": "Scroll Bars",
"resizable": "Resizable",
"status": "Status Bar",
"personalbar": "Personal Toolbar / Bookmarks / Site Navigation Ba",
"location": "Location Bar",
"fullscreen": "Open in Fullscreen (not implemented in many browsers)",

for (const [key, value] of Object.entries(settings)) {
var input = document.createElement("input");
input.type = "checkbox"; = key;
input.value = key; = key;

var label = document.createElement('label')
label.htmlFor = key;
label.appendChild(document.createTextNode("\u00A0" + value));

var li = document.createElement("li");


function openPopup () {
var winFeatures = ""

for (const [key, value] of Object.entries(settings)) {
var input = document.getElementById(key);
if (input.checked)
winFeatures += key + "=yes,"
winFeatures += key + "=no,"

if(windowRef == null || windowRef.closed) {
windowRef ="", "Popup", winFeatures);
} else {
alert ("Popup already opened!? Please close it to test again.");

**TEST NOW:** <a href="" target="Popup" onclick="openPopup(); return false;">Open using above settings.</a>

The test should be browser independent, you just need to have Javascript enabled.
However, let me know if it doesn't work for you!

To see how I implemented the test tool take a look into the source code of this page, or [check the script on GitHub](
Remember? This blog is all open source :)

0 comments on commit df884df

Please sign in to comment.