过大的Ajax响应的移动Safari浏览器? [英] Too large an AJAX response for mobile safari?

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

问题描述

我遇到了一个有点问题,在调试Web应用程序的移动Safari浏览器。 Web应用程序是一个前端为一个相当复杂的服务器端仿真工具。如何Web应用程序的工作原理概述如下:

I am running into a bit of a problem in debugging a web application for mobile safari. The web app is a front-end for a fairly complex server-side simulation tool. The overview of how the web app works is:

  1. 用户是psented一个屏幕,他们填写的值要执行的模拟$ P $。
  2. 在用户点击运行模拟这时一个AJAX调用到服务器。页面上的状态窗格被更新,说明仿真正在运行。 PHP脚本运行与已发布的值模拟器,并发送回一些JavaScript先更新指示数据的状态栏检索,然后设置另一个AJAX调用请求产生的数据。
  3. 的服务器用的模拟 - 少数大型阵列JSON格式的数据第二AJAX调用(总数据1-2MB的顺序),以及一些JavaScript来清除状态面板,和剧情结果的初始步骤。
  4. 然后,用户可以使用一些滑块/标签来查看不同的地块,穿行仿真时间步骤,等等。

所有这些奇妙的作品为主要的桌面浏览器(IE 7+,火狐(WIN,MAC,LINUX),Safari浏览器(在Mac,Windows)等)。然而,在移动Safari浏览器,步骤1和2去精(所有的JavaScript执行更新状态面板,等..),但一切都分崩离析,在第3步 - 它好像的JavaScript返回永远不会执行(状态窗格从来没有清除,并将结果绘制永远不会)。

All of this works wonderfully for the major desktop browsers (IE 7+, Firefox (win, mac, linux), safari (Mac, windows), etc..). However, on mobile safari, steps 1 and 2 go fine (all javascript is executed to update the status pane, etc..) but everything falls apart at step 3- it seems as if the javascript being returned is never executed (the status pane never clears, and results are never plotted).

我已经插入了一些警告调试,但那些不执行任何。最后,我想回到一切,但仿真数据,一切工作正常(虽然情节是空白的),所以它是错误的东西在这个大的返回JSON数据。 Safari的JavaScript调试器不显示错误,我不知道如何着手调试这样的事情。任何想法?

I have inserted some alerts to debug, but those are not executed either. Finally, I tried returning everything but the simulation data, and everything works fine (though the plots are blank) so it is something wrong in this large return of json data. The safari javascript debugger shows no errors, and I have no idea how to proceed debugging something like this. any ideas?

推荐答案

我不能告诉你答案您的问题,但在这里就是我倒是调试:

I can't tell you the answer to your problem, but here's how I'd debug:

  • 尝试获得服务器发送的数据回只有几KB
  • 看看你是否可以打印数据
  • 的大小
  • 将数据分解成更小,更易于管理的块(JSON,就是要小反正)

不是一个真正的答案,就像我说的。更多的方法。

Not really an answer, like I said. More an approach.

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

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