Freigeben über


A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive.

Your get one of these errors when running Internet Explorer:
Stop running this script?
A script on this page is causing Internet Explorer to run slowly.
If it continues to run, your computer might become unresponsive.

"A script on this page is causing Internet Explorer to run slowly.  If it continues to run, your computer may become unresponsive." "Do you want to abort the script?"

Explanation:
When Internet Explorer runs more than 5 million lines of script, you will get this error.  If you choose to continue, the counter is reset and after another 5 million lines of script, you will get the error again.

Workarounds:
Reduce the number of iterations/statements in the code.  If you run Process Monitor and see what registry keys are read, you will see a client side registry key related to lines of code but this is not practical to use because you would not be able to push this registry setting down to all clients.  Also, since it is not documented, it is not supported.

Sample to create the problem:

<html>

<head>

</head>

<script language="javascript">

var totCount=0;

function loopy()

{

// i - 100K iteration loop

for (var i=0; i<100000; i++)

{

jloop();

}

alert (totCount);

}

function jloop()

{

// 10 iterations (1 million total with this)

for (var j=0; j<10; j++)

{

kloop();

}

}

function kloop()

{

//k - 5 iterations

for (var k=0; k<5; k++)

{

totCount++;

}

}

</script>

<body>

<input type="submit" name="btn_Login" value="Login" onclick="loopy(); " language="javascript" id="btn_Login" />

</body>

</html>

Comments

  • Anonymous
    October 24, 2010
    On IE6, 70000 lines javascripts will pop the dialog, could u explain it? thanks, Simon.

  • Anonymous
    October 24, 2010
    The comment has been removed

  • Anonymous
    November 26, 2010
    Yes, this is indeed a problem.  So is there a solution besides editing the registry?

  • Anonymous
    November 26, 2010
    There is a solution besides editing the registry: "Workarounds: Reduce the number of iterations/statements in the code."

  • Anonymous
    November 08, 2011
    i dont know how to stop a long running script internet is very slow

  • Anonymous
    November 08, 2011
    Hi Karen, If you are the developer of the web page you can take the steps outlined in this post.  If you are not the developer you have to contact the owner of the page and let them know the page needs to be fixed (and point them to this article). -Jeff

  • Anonymous
    March 13, 2012
    The comment has been removed

  • Anonymous
    March 13, 2012
    Hey P, It would be great if you would give FB some feedback here: www.facebook.com/help -Jeff

  • Anonymous
    March 14, 2012
    A script on this page is causing my computer to run slow.I need help rite now!

  • Anonymous
    March 14, 2012
    Hi Katrina! If you are the developer of the web page you are having touble with, you should be able to follow this blog post to resolve your issue.  If you are not the developer of the web page or not a web developer, you probabably will not understand this post... however in short, the person who created the web page/web site needs to fix the problem they caused.  You can contact them to fix it because it is not put together very well!  Often on pages there is a feedback link or contact us link at the bottom. -Jeff

  • Anonymous
    September 15, 2012
    My script is in Facebook and internet Explorer..Went to Mr Fix It for get it will not even let me load.  No help from anyone so by by internet....Yes they should fix the problem but why would they when we just keep paying. and nothing gets done.