Ajax请求的浏览器的限制 [英] ajax request browser limit

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

问题描述

一个更通用的问题开始。是有限制的Ajax请求的响应大小,如果它是一个JSON请求?

A more generic questions to start. Is there a limit to the response size of an ajax request, if it is a JSON request?

我通过JSON请求传递大量的数据,并运行到'脚本堆栈配额耗尽的消息在FF3。现在在FF2配额为4MB,但在FF3是640KB。我想知道这是否是JSON具体不知。做正常的Ajax请求有一个响应大小的限制?一个可以由浏览器强加?如果非JSON请求不具有脚本堆栈的配额,这些同样的问题,我怎么会分类数据回来? XML也许是......林不知道我是否会成为W3C规范与我的数据的范围内这样做。

I am passing large amounts of data through a JSON request and running into a 'script stack quota is exhausted' message in FF3. Now in FF2 the quota was 4mb but in FF3 it is 640kb. I am wondering if this is JSON specific somehow. Do normal ajax requests have a response size limit? One that may be imposed by the browser? If a non-JSON request doesn't have these same issues with script stack quota, how could I categorize the data coming back? XML perhaps...Im not sure if I would be within the bounds of the w3c spec with my data to do so.

推荐答案

IIRC,这是去年FF3的错误,但我相信(是的,检查它的这里)它是固定的。再往下看,虽然评论,有这样一个字条:

iirc this was a bug on FF3 last year but I believe (yes, checked it here) it's fixed. Looking down the comments though, there's this note:

注:该测试取决于   体系结构和可用内存。上   一个x86_64的机器搭配2G和64位   建立,它将失败,   InternalError该:脚本堆栈空间   配额耗尽但是在x86_64的   有4G和64位构建它会   通过。

Note: this test is dependent upon architecture and available memory. On a x86_64 machine with 2G and a 64bit build, it will fail with InternalError: script stack space quota is exhausted however on a x86_64 with 4G and a 64bit build it will pass.

的意见,也读了,这是一个纯JS的问题,这意味着虽然数据格式将严格不要紧,JSON非常大的数据块可能打击JS的堆栈,其中的XML字符串可能不是。我认为你必须要尝试一下。

The comments also read that this is a pure JS problem, which means although the data format will strictly not matter, very large chunks of JSON might blow the JS stack where XML strings might not. I think you just have to try.

OTOH,它被标记为固定的,所以有确保你在FF的最新版本太多的问题了。

OTOH, it is marked fixed, so there's a question of making sure you're on the latest version of FF too.

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

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