How to set time-out period for script
This article was previously published under Q175500 SUMMARYBecause some scripts may take an excessive amount
of time to run, Internet Explorer prompts
the user to decide whether they would like to continue running the slow script.
Some tests and benchmarks may use scripts that take a long time to run and may
want to increase the amount of time before the message box appears. In Internet
Explorer,
the script time-out value can be changed on specific client machines by
modifying a registry entry. MORE INFORMATION There are situations when a Web page contains script that
takes an unusually long time to run. If you are scripting an ActiveX control on
a Web page to transfer a very large file or do a large database query, this
will often cause a significantly long delay. Internet Explorer 3.02 detects the
long delay and prompts the user with a dialog box reading the following: This page contains a script which is taking an unusually long time to finish. To end this script now, click Cancel. 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?" In Internet Explorer 3.02, this message box can appear on machines running Windows 95. The version 3.02 browser is specifically looking to see if the script thread has pumped any windows messages in the last five seconds. There is no way to override this time-out period for Internet Explorer 3.02. If you are using an ActiveX control with long blocking operations, that ActiveX control should either employ an event mechanism and return control to the caller or call PeekMessage every five seconds to reset the time-out. As of Internet Explorer 4.0, 5.0, 6, and 7, the time-out is no longer a fixed value based on Windows messages. Internet Explorer now tracks the total number of executed script statements for the current page with the script engine and throws up the time-out dialog box when that value hits a threshold amount. Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 (http://support.microsoft.com/kb/322756/) How to back up and restore the registry in Windows To change this time-out value in Internet Explorer 4.0, 5.0, 6, or 7, follow these steps:
Because the Internet Explorer 4.0, 5.0, 6, and 7 time-out is based on the number of script statements executed, the time-out dialog box will not display during ActiveX control or database-access delays. Endless loops in script will still be detected. APPLIES TO
| Article Translations
|

Back to the top
