Different browsers have different criteria for terminating script execution: The statements and quantities that the IE monitor script executes. When the number of executed statements reaches the maximum limit, the default is 5 million, which pops up the dialog box that terminates the script run. The total time that Firefox monitors scripts to run. When the pre-set time is exceeded, the default is 10 seconds, which terminates the dialog box for the script to run. Safari also detects whether a script is running for a long time by execution time. The default is set to 5 seconds, and a timeout will pop up the dialog box that terminates the script. Chrome 1.0 does not limit the maximum amount of time JavaScript is allowed to execute. The process crashes when there is not enough memory. Opera is the only browser that does not provide the protection that monitors long-running scripts, allowing scripts to continue to execute until completed.
If you see a dialog box that terminates the script, this means that the JavaScript code needs to be refactored or has a performance vulnerability. Pages that exceed 100ms of script execution time will almost certainly make the user feel too slow to run.
Different browsers have different criteria for terminating script execution: