Stop running this script

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.

I'm sure we've all seen this useful and informative error message from IE7 (or rather IE8 in IE7 mode). I need some help with removing this message.

So, for my work, I need to get our website working in IE7. Apparently, some of our clients can't upgrade or use another browser (corporate regulations or something).

Anyway, the page in question contains tabs (using jQueryUI). After the page loads, jQuery loads the data for each tab using AJAX; the tabs are loaded one by one, using a queue. In each tab, there are 'widgets' which contain HTML and JavaScript (for each tab load, there are various script tags).

I am getting the 'slow script' error during the loading of the tabs. I know that IE hates when scripts don't return control to the browser. So, I was wondering if there was a way to 'return control' or sleep somehow, so IE can 'reset' it's slow script counter.


Someone came up with an idea here

Avoiding the 'Script taking too long' (all browsers have some form or another of this) message in browsers is relatively simple. You just have to make sure the browser knows you have not created an endless loop or recursion. And the easiest way to do is is to just give the browser a breather in between long running tasks.

So how would we go about this. Well the simplest solution is to just break up your task into mutliple smaller tasks with a setTimeout in between these tasks. The utility (see link) does just this

Need Your Help

MVC4 DataType.Date EditorFor won't display date value in Chrome, fine in Internet Explorer editorfor

I'm using the DataType.Date attribute on my model and an EditorFor in my view. This is working fine in Internet Explorer 8 and Internet Explorer 9, but in Google Chrome it is sh...

How do I change java logging console output from std err to std out?

java logging

I'm using the standard ConsoleHandler from java.util.logging and by default the console output is directed to the error stream (i.e. System.err).