浏览器响应大小限制 [英] Browser response size limit

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

问题描述

我正在通过jQuery的getJson()调用跨域Web服务.由于我的响应对象大小很大,因此我在Web服务中使用了最大的JSon大小.我已经检查过getJson()给正确的响应对象.但是仍然没有调用我的回调函数. Firebug表示已超过(firefox)响应大小.

I am calling my cross domain web-service through a getJson() call from jQuery. As my response object size is pretty big, i have used the maximum JSon size for my web-service. I have checked getJson() is giving proper response object. But still my callback function is not called. Firebug is saying that it's(firefox) response size is exceeded.

有人可以告诉我标准浏览器(例如Firefox)处理的最大浏览器响应大小限制是多少以及如何处理该问题吗?

Can anybody tell me whats the maximum browser response size limit that the standard browser e.g (firefox, ie) handle and how to deal with the problem?

这是相同的代码段.

 //Wrapper call to the actual getJson call
 function getResponse() {
    var localService = new getServiceProxy("SearchData.asmx");
    localService.invoke("Search", "", "successcall");
 }

 //getJson call
 function getServiceProxy(serviceUrl) {
     var _I = this;
     this.serviceUrl = serviceUrl;

     // *** Call a wrapped object
     this.invoke = function(method, data, callback, error) {

         if (data == "") {
             var url = _I.serviceUrl + "/" + method + "?output=json&callback=?";
         }
         else {
             url = _I.serviceUrl + "/" + method + "?" + data + "&output=json&callback=?";
         }
         $.getJSON(url, function(arg) {       
             var evalstr = callback + "(" + JSON.stringify(arg) + ");";
             eval(evalstr);
         });
     }
 }

 //success callback function
 function successcall(multiSearchResponse) {
     //use the response.
 }

任何帮助将不胜感激.

感谢Subrat.

推荐答案

在一个项目中已经经历过一次,而我记得IE对POST和GET请求的限制是2083个字符. FF有一个较大的限制,但不是无限的.

Ive been through this once in a project, and what I recall was that IE has a limit of 2083 characters for both POST and GET requests. FF has a larger limit, but not limitless.

http://support.microsoft.com/kb/208427

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

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