Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
432 views
in Technique[技术] by (71.8m points)

javascript - How to programatically change the about:config dom.max_script_run_time value in Firefox?

I am just wondering if there is any way to programatically change the dom.max_script_run_time value in the Firefox about:config window.

When the default values in my Firefox is 10, I think its too less to run a script running for longer time in my website. On when the value is set to default(i.e.10) my firefox goes Not Responding and I get warning alert message like Warning: Unresponsive Script I just need to set the value to 20 or 30 to avoid any such alerts popping often and let the script to run for longer time.

So I just need to change the dom.max_script_run_time each time the page gets loaded.

I have tested this in other browsers like Firefox, Chrome, Safari, Palemoon and Opera..

I have this problem only in Firefox

Or is there any other way rather than changing the settings and loading the page?

Any solution will be appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

definitely, you can't change that value via web. I'm 100% sure

you should try to redesign your scripts and make your pages lighter

for example you should avoid, sadly, on firefox, as best you can

  • border-radius
  • box-shadow
  • text-shadow
  • dynamic gradients like -moz-linear-gradient -moz-radial-gradient etc
  • transitions/animations and transforms
  • frequent text rendering and re-rendering
  • huge backgrounds especially with background-attachment:fixed
  • flash objects, canvas, svg

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...