Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a way to prevent JavaScript on a webpage from resizing and repositioning my Internet Explorer window.

This option is available in Firefox, but I can't find anything similar in Internet Explorer:

Firefox Javascript Options window

I am using Internet Explorer 7 in Windows XP SP3.

For what it's worth, the script doing the resizing is:

<script language="JavaScript">
    function getFocus(){
    window.onload = getFocus;

and this script seems to not resize the window with Internet Explorer 8, but upgrading is not currently an option (work computer).

share|improve this question
up vote 2 down vote accepted

I emailed the Internet Explorer team at the IEBlog and received the following response:

No, IE doesn't have options that are that fine-grained.

share|improve this answer

On a browser with such option (like Firefox or Opera), you can just disable that option at the preferences. It seems you can't do that in IE.

On a browser with support for User Javascript (like Opera, or Firefox with Greasemonkey extension), you can write a script to replace window.moveTo and window.resizeTo functions with dummy versions (or just disable them). Of course, IE does not support that.

Then, you can try to inject JavaScript code in HTML by using any content-filtering program (in other words, a personal web proxy), like Proxomitron (old, abandonware) or Privoxy (free software, GPL). A software like this will intercept HTTP requests and modify them (according to some rules) before delivering the content back to the browser. This means you can not only inject content, but also remove that offending script from the page.

share|improve this answer
If you know how to write such a script or can get someone to write it for you or find one already written... AND you're willing to use an alternate shell for IE, you might look into IE7Pro (, because it supports userscripts. – Nathaniel Sep 14 '09 at 2:46

This might help you IE7 Window Resize

share|improve this answer
There is a good write up at – ukanth Sep 14 '09 at 9:23

The only way to do this would be to dissable JavaScript.

Click Tools Menu > Internet Options > Security Tab > Custom Level > Scripting > Active Scripting

share|improve this answer
Cures the disease by killing the patient. – Kevin Panko Sep 11 '09 at 16:32
Any brighter ideas? As far as I know you dont have this level of control in IE. It's all or nothing... Say good bye to the patient. – Greg B Sep 14 '09 at 14:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.