I am developing a site that makes extensive use of JavaScript (jQuery). I regularly get the IE 'Stop running this script?' error dialog when I try to close the browser.
I'm guessing the problem occurs because the site is a single page that uses AJAX, so there are no postbacks to reset IE's count of commands executed.
Client-side registry hacking is not an option.
Does anyone know a way to get around this error?
UPDATE: The page has a number (~10) interval timers that poll continually on 30 or 60 second intervals.
A script on this page may be busy or may have stopped responding. You have the choice of "Stop Script" or "Continue" buttons. Click the "Stop Script" button to stop the script from running. Stopping the script can prevent the browser from running out of memory or crashing.
I have also faced this issue and had overcame this issue by dividing the continous DOM executio. For this approach, I used setTimeout
function. Resolving this issue completely depends on how you are dividing the continuous execution.
Do you by chance use a window.onunload handler? If you do, you might check that you don't have an infinite loop in there.
To check, at the bottom of your javascript do:
window.onunload = null;
and test again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With