Tuesday, September 27, 2011

Firefox script timeout and workaround

Bookmark and Share

In Firefox scripts time out frequently while accessing web pages which large data. By large data, I mean that scripts/web pages taking long time to crunch data on client-side. e.g. plotting JavaScript based graphs with more than 20K data points. In this case, data has to be downloaded at client side and graphs will be plot. (This is just an example. We can process these points on sever-side and send chart image to client side.)

However, Firefox will timeout in such cases and possibly hang. In order to workaround this problem, we can set few DOM preferences available in Firefox. Below are the steps that I used to resolve similar kind of problem with Firefox.

1. Navigate to Firefox preferences by typing “about:config “ in address bar

2. Type in “dom” and look for “dom.max_chrome_script_run_time” and “dom.max_script_run_time” and set this values to more than 30(seconds by default) e.g. 60 or 120 seconds.

More info @ DOM Preferences

3. Restart Firefox.

This workaround has worked for me. Are there are any other workarounds that you know? then please post it in the comments below.


No comments:

Post a Comment

Your valuable comments are welcome. (Comments will be moderated.)

 




Technology