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
194 views
in Technique[技术] by (71.8m points)

javascript - Maximum json size for response to the browser

I am creating tree with some custom control prepared with JavaScript/jquery.

For creating the tree we are supplying json object as the input to java-script to iterate through and create the tree.

Since the volume of data may go up-to 25K nodes. during a basic load test we identified that the browser will be crashed for such volume.

The alternate solution is just load first level of the nodes and rest load on demand via AJAX request. the volume of first level can vary up-to 500 - 1K nodes.

What is the max size a json should have as a response from the server. What could be the best approach to process such volume of data on browser.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

There is no max size limit of the http response (or the max size of Int or the limit of browser or the limit of server have been configured).

The best approach is use AJAX to load part of data while it need to be shown.


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

...