AJAX-xmlhttp.responseText大小?


                    

使用下面的AJAX请求,我可以从ASP页中通过HTML接收到的最大HTML数量是多少? 没有限制或性能问题吗? 我想请求一张图片列表(介于20到100之间),包括显示它们的HTML代码,并将其显示在“ myElement”中。</ p>

  var xmlhttp;

如果(window.XMLHttpRequest)
     xmlhttp =新的XMLHttpRequest();
其他
     xmlhttp = new ActiveXObject(“ Microsoft.XMLHTTP”);

xmlhttp.onreadystatechange = function(){
     如果(xmlhttp.readyState == 4 && xmlhttp.status == 200)
         document.getElementById('myElement')。innerHTML = xmlhttp.responseText;
};

xmlhttp.open(“ GET”,“ myPage.asp?ID =” + id,true);
xmlhttp.send();
</ code> </ pre>

非常感谢</ p>
     </ div>

展开原文

原文

Using the below AJAX request, what is the largest amount of HTML I can receive through this, from my ASP page? Is there no limit or performance issues? I would like to request a list of images (between 20 and 100) including the HTML code that displays them, and display it in 'myElement'.

var xmlhttp;

if (window.XMLHttpRequest)
    xmlhttp = new XMLHttpRequest();
else
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

xmlhttp.onreadystatechange = function() {
    if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
        document.getElementById('myElement').innerHTML = xmlhttp.responseText;
};

xmlhttp.open("GET","myPage.asp?ID="+id,true);
xmlhttp.send();

Many thanks

1个回答


HTTP规范中没有最大限制。 浏览器或服务器软件可能会施加某种限制,但是该限制通常很高。 100张图像实际上什么都不是,除非您确实做错了,否则100张图像的代码将少于1kb。</ p>
     </ div>

展开原文

原文

There's no maximum limit in the HTTP spec. Browsers or the server software might impose some sort of limit, but that limit is usually fairly high. 100 images is practically nothing, and the code for 100 images is going to be less than 1kb, unless you're doing something really wrong.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐