获取动态生成数据的xmlhttprequest似乎有一个大小限制 [英] xmlhttprequest to get dynamically generated data seems to have a size limit

查看:82
本文介绍了获取动态生成数据的xmlhttprequest似乎有一个大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我希望这是讨论这种奇怪的行为的正确场所。我使用xmlhttprequest从

服务器端获得动态生成的文本或xml。如果服务器端数据是STATIC,那么
可以包含我想要的任何大小的数据。


但是如果数据(xml或文本)是动态生成的使用PHP,然后

似乎有一个大小限制! xmlhttprequest'的responseText是截断的,因此xml不会很好。在边框情况下(只是稍高于某个文件大小限制的
),甚至有RANDOM

行为,有时候它会起作用,当刷新它不起作用时,

,下一次再次运作。


有类似问题的人吗?如果您有兴趣,我也可以发布

代码以及发生此行为的详细摘要。


向大家致以问候,

ted

hi everybody, i hope this is the right place to discuss this weird
behaviour. i am getting dynamically generated text or xml from the
server side using xmlhttprequest. if the server side data is STATIC, i
can have whatever size of data i want.

but if the data (xml or text) is generated dynamically using php, then
there seems to be a size limit! xmlhttprequest''s responseText is
truncated, and the xml therefore not well fromed. in border cases (just
about a little above some file size limit), there is even RANDOM
behaviour, sometimes it works, and when refreshing it does not work,
and the next time it works again.

anybody having similar issues? if you''re interested, i can also post
code and a detailed summary of when this behaviour occurs.

greetings to all of you,
ted

推荐答案



ted benedict写道:

ted benedict wrote:
大家好,我希望这是讨论这种奇怪行为的正确场所。我使用xmlhttprequest从
服务器端获取动态生成的文本或xml。如果服务器端数据是STATIC,我可以拥有我想要的任何大小的数据。

但如果数据(xml或文本)是使用php动态生成的,那么
似乎有一个大小限制! xmlhttprequest'的responseText被截断,因此xml没有很好。在边框情况下(只是略高于一些文件大小限制),甚至有RANDOM
行为,有时它可以工作,当刷新它不起作用时,
和下一次它再次工作。

任何有类似问题的人?如果您有兴趣,我也可以发布
代码和发生此行为的详细摘要。

向大家致以问候,
ted
hi everybody, i hope this is the right place to discuss this weird
behaviour. i am getting dynamically generated text or xml from the
server side using xmlhttprequest. if the server side data is STATIC, i
can have whatever size of data i want.

but if the data (xml or text) is generated dynamically using php, then
there seems to be a size limit! xmlhttprequest''s responseText is
truncated, and the xml therefore not well fromed. in border cases (just
about a little above some file size limit), there is even RANDOM
behaviour, sometimes it works, and when refreshing it does not work,
and the next time it works again.

anybody having similar issues? if you''re interested, i can also post
code and a detailed summary of when this behaviour occurs.

greetings to all of you,
ted




我打赌我的糖对你的咖啡,你正在达到GET限制

由IE施加:

< http:/ /www.ajaxtoolbox.com/forum/viewtopic.php?t=26>

派生自

< http://support.microsoft.com/default.aspx ?scid = KB; zh-cn; q208427>


您应该只使用clj认可的格式良好的库,例如AjaxToolBox

来保护已知, Ajax不为人知的未知问题

技术集。


IMHighlyHO



I bet my sugar against your coffee that you are hitting the GET limits
imposed by IE:
<http://www.ajaxtoolbox.com/forum/viewtopic.php?t=26>
derived from
<http://support.microsoft.com/default.aspx?scid=KB;en-us;q208427>

You should use only clj endorsed well-formed libraries like AjaxToolBox
to be protected from the known, mal-known and unknown issues of Ajax
technologies sets.

IMHighlyHO





ted benedict写道:



ted benedict wrote:

但如果数据(xml或文本)是使用php动态生成的,那么<似乎有一个尺寸限制! xmlhttprequest'的responseText被截断,因此xml没有很好。


考虑不要使用responseText,而是让你的PHP脚本执行

header(''Content-Type:application / xml'');

在发送任何XML数据之前,这样你使用的XMLHttpRequest对象将自动解析响应体并构建responseXML。

在边界情况下(只是稍微超过一些文件大小限制),甚至有RANDOM
行为,有时它可以工作,当刷新它不起作用时,
和下一次它再次工作。
but if the data (xml or text) is generated dynamically using php, then
there seems to be a size limit! xmlhttprequest''s responseText is
truncated, and the xml therefore not well fromed.
Consider not to use responseText at all, rather make your PHP script do
header(''Content-Type: application/xml'');
before it sends any XML data and that way the XMLHttpRequest object you
use will automatically parse the response body and build responseXML.
in border cases (just
about a little above some file size limit), there is even RANDOM
behaviour, sometimes it works, and when refreshing it does not work,
and the next time it works again.




这是发生在所有浏览器还是只有一个特定浏览器

分别是XMLHttpRequest的一个特定实现?

什么

httpRequestObject.status

httpRequestObject.statusText

httpRequestObject.getAllResponseHeaders()

看起来像你有什么问题?


多长时间(例如几秒钟或一分钟甚至几分钟?)

PHP脚本需要在脚本完成之前编写完整的数据,也许是浏览器

超时?


-

Martin Honnen
http://JavaScript.FAQTs.com/


VK写道:
VK wrote:
ted benedict写道:
ted benedict wrote:
大家好,我希望这个是讨论这种奇怪的行为的正确场所。我使用xmlhttprequest从
服务器端获取动态生成的文本或xml。如果服务器端数据是STATIC,我可以拥有我想要的任何大小的数据。

但如果数据(xml或文本)是使用php动态生成的,那么
似乎有一个大小限制! xmlhttprequest'的responseText被截断了,因此xml没有很好用。在边框情况下(只是略高于某个文件大小限制),甚至还有RANDOM
行为,有时它起作用,当它刷新它不起作用时,
并且下次它再次起作用。
[...]
hi everybody, i hope this is the right place to discuss this weird
behaviour. i am getting dynamically generated text or xml from the
server side using xmlhttprequest. if the server side data is STATIC, i
can have whatever size of data i want.

but if the data (xml or text) is generated dynamically using php, then
there seems to be a size limit! xmlhttprequest''s responseText is
truncated, and the xml therefore not well fromed.

in border cases (just
about a little above some file size limit), there is even RANDOM
behaviour, sometimes it works, and when refreshing it does not work,
and the next time it works again.
[...]




I bet my sugar against your coffee that you are hitting the GET limits
imposed by IE:




你又输了。他正在谈论被截断的响应文本(responseText

属性),这与IE施加的

URI长度限制没有任何关系。

PointedEars



You lose again. He was talking about the response text (responseText
property) being truncated, which does not have anything to do with the
URI length limit IE imposes.
PointedEars


这篇关于获取动态生成数据的xmlhttprequest似乎有一个大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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