weixin_33696822 2011-10-07 01:51 采纳率: 0%
浏览 70

AJAX-xmlhttp.responseText大小?

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条回答 默认 最新

  • weixin_33739646 2011-10-07 01:58
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥100 求数学坐标画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站