Javascript – “Stop running this script?” error


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.

Best Solution

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.

Related Question