Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

javascript - What are the js recursion limits for Firefox, Chrome, Safari, IE, etc?

I've got some Javascript code which uses fairly deep recursion and I'd like to find out what the recursion limits in the various browsers are (i.e. the point at which the error "too much recursion" will happen).

Anyone have any solid numbers on this, by version?

question from:https://stackoverflow.com/questions/2805172/what-are-the-js-recursion-limits-for-firefox-chrome-safari-ie-etc

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

1 Answer

0 votes
by (71.8m points)

Nicholas C. Zakas writes in his blog:

  • Internet Explorer 7: 1,789
  • Firefox 3: 3,000
  • Chrome 1: 21,837
  • Opera 9.62: 10,000
  • Safari 3.2: 500

There's some more data on different browsers and OSs here.

I've created a Browserscope test to get more data. Please run it here.

Update:

The results above are now obsolete, but the browserscope results are updated :

  • IE 11: 12,064
  • Firefox 65: 20,614
  • Chrome 72: 9,643
  • Opera 57: 9,638
  • Safari 12: 32,035

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...