rss

Prevent websites from resizing Firefox's browser window

Wednesday, August 5, 2009

Firefox is my browser of choice. This browser is now more secure than ever, rock solid, very polished and popular enough that you had dozens of extensions to customize it to your liking.

Now, one of the most obvious tweaks you can apply to your Firefox installation is removing the annoyance of letting websites resize the window at their will. Despite of the more sophisticated pop-up blocker that comes in most recent versions of the browser, many websites still do away with popping those up and in many cases resizing either your main window or maximizing the pop-up window to get your full attention (just before you hit the X button).

You won’t even need an add-on to do this.

  1. Go to Tools > Options
  2. Click on the Content tab
  3. Next to where it says "Enable Javascript", click on Advanced
  4. Uncheck the option "Move or resize existing windows"
  5. It is also a good idea uncheck the option "Raise or lower windows"

Click on the OK button twice to save the changes, and then you’re done. This will disallow any website to adjust the size of your browser window. It’s a great way to make sure your browsing experience stays yours.


How to reproduce this annoying feature ?

A simple way to do it is using JavaScript:


<script type="text/javascript">

The screen width, height can be obtained from: screen.width and screen.height

var w = screen.width;
var h = screen.height;

To move a browser window to a specific location on the users screen using JS:

window.moveTo(0, h - 100);

To resize the browser window: window.resize(width, height);

window.moveTo(w/2, h/2);

</script>


This code is usually written in the HTML page within the tag <body>. If you want to test if you have this annoying feature enabled click here.

1 comments:


Corelis said...

We would like to exchange links with you. We offer a complete product line of JTAG (boundary-scan) circuit board testing tools called ScanExpress, for interconnect testing and JTAG in-system programming. Please visit us at http://www.corelis.com or contact us for a link exchange.

Many Thanks.