Ajax响应非常慢。 [英] Ajax responses very slow.

查看:175
本文介绍了Ajax响应非常慢。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,


我有一个Web应用程序,通过它可以使用ajax将数据发布到服务器上并返回结果。当我提醒xmlhttp.readystate时,有时需要很长时间,这个过程看起来像冻结,有时它的设计非常快。


我通过提醒xmlhttp.readystate检查。


有时我会快速响应1,2,3 4作为警报框。

有时我只得到1然后没有任何反应。 />

有没有经历过同样的人。


问候,

Anubhav

Hi Friends,

I have a web application through which, the ajax is used to post the data onto the server and return the results. When i alert the xmlhttp.readystate sometimes it takes long time, that the process looks like freezing and sometimes its done very quickly as it is designed to.

I checked by alerting xmlhttp.readystate.

sometimes i get response 1,2 ,3 4 as the alert box quickly.
and sometimes i just get 1 and then nothing happens.

Has any one experienced the same.

Regards,
Anubhav

推荐答案

您的PHP文件可能有问题。尝试通过手动调用将相同的变量发送到文件(在浏览器地址栏中输入),也许这个文件永远不会回来。


我唯一能想到的就是这个。



Dan
maybe problem with your PHP file. Try to send the same variables to the file through a manual call (enter it in your browser address bar), it maybe that this file never gets back.

Only thing I can think of that causes this.



Dan


只是尝试从虚拟PHP文件中获取响应......


如果每次调用的响应时间都相同..那么dlite922告诉你PHP的问题......可能你需要解决一些问题..


问候

Dheeraj Joshi


我没有遇到过这样的问题。
Just try to get the response from a dummy PHP file...

If the response time is same for every call.. then as dlite922 told its a problem with your PHP... Prpbably you need to fix some issues..

Regards
Dheeraj Joshi

I did not faced such problems.


我查了一下,但是如果我将变量直接发送到php文件作为表单标签中的操作,它很好。我使用IE 7.0,有时它工作正常,有时不起作用。
I checked that , but if i send the variables directly to the php file as the action in the form tag, it goes out fine. I am using IE 7.0 and sometimes it works fine and sometimes does not work.


这篇关于Ajax响应非常慢。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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