views:

896

answers:

4

I have some JQuery that takes a while to run and after a few second I get the error:

Stop running this script? A script on this page is causing internet explorer to run slowley. If it continues to run, your computer may become unresponsive

Is there a way to extend the timeout? I guess that would mean extending the timeout on the persons machine who browses to the URL

A: 

Any idea why your script is so slow? Lots of nested loops for instance?

Natrium
+1  A: 

If you asking about programmaticly change it, so the answer you cann't since it unsecured action and there is no browser will allow you to do it.

PS. As it suggested above try understand the problem and refactor your code in order to reduce the execution time.

Artem Barger
+1  A: 

Hi,

jQuery have its own time out property. See: http://www.mail-archive.com/[email protected]/msg15274.html However - the message your getting is not jQuery issue but a server or architecture issue.

Try to see if your loading too many Ajax calls on the same time. see if you can change its way to handle less calls at a time.

Also, check the server to see how long does it take to get response. In very long xml's return it happens that the server take too much time to respond. if that the case - the server side application or service needs modification.

Hope that helps.

yn2
+1  A: 

Under Internet Explorer the maximum instruction allowed to run in a script before seeing timeout dialog is controlled by a registry key :

HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\Styles\MaxScriptStatements

This is a maximum statements so it shouldn't be related to how fast the computer run. There might be others values that I'm not aware of.

The default value is 5 000 000. Are you doing too much ?

See http://support.microsoft.com/kb/175500.

Emmanuel Caradec