响应浏览器的最大json大小 [英] Maximum json size for response to the browser

查看:685
本文介绍了响应浏览器的最大json大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个使用JavaScript / jquery准备的自定义控件的树。

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

为了创建树,我们提供json对象作为java脚本的输入来迭代通过并创建树。

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

由于数据量可能达到25K节点。在基本负载测试期间,我们发现浏览器将因此类崩溃而崩溃。

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.

备用解决方案只是加载第一级节点,并通过AJAX请求按需加载。第一级的音量可以在500到1K节点之间变化。

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.

json作为来自服务器的响应应具有的最大大小是多少。什么是在浏览器上处理如此大量数据的最佳方法。

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.

推荐答案

http响应没有最大大小限制(或者Int的最大大小或浏览器的限制或限制已经配置了服务器)。

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).

最好的方法是在需要显示时使用AJAX加载部分数据。

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

这篇关于响应浏览器的最大json大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆