Unresponsive Script errors in Firefox

By JuliaOstrowski posted Jun 09, 2014 12:48 PM


These errors are more of a browser problem than anything else. In this case, we have some javascript that has to be run for each device before actually drawing the page. Now, if the client machine in question is loaded, then IE reaches a timeout, which is why you see it sometimes, but not all the time. I would recommend using Firefox, as these settings can be tweaked.

For pages which have a lot of data and thus requiring more time, you can change some settings, so AMP can finish processing the page.

When JavaScript code runs for longer than a predefined amount of time, Firefox will display a dialog that says Warning: Unresponsive Script. This time is given by the settings dom.max_script_run_time and dom.max_chrome_script_run_time.

To fix it, youll need to access the hidden configuration page in Firefox. Just type about:config in the address bar and youll get a page full of hidden configurations.

In the Filter box, type dom.max_script_run_time. This will narrow the options till only the dom.max_script_run_time option remains. Right-click it and choose Modify. A box pops up. Change the number to something bigger like 20. This is the maximum time a script can run before Firefox considers it unresponsive.

If you cant find the string in the about:config page, create it by right-clicking anywhere and then choose New> Integer and enter dom.max_script_run_time. When prompted for the value, use 20.

As for max_chrome_script_run_time, change that setting to 30.