473,708 Members | 2,438 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ajax responses very slow.

22 New Member
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.readyst ate 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.readyst ate.

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
Aug 24 '09 #1
10 7259
dlite922
1,584 Recognized Expert Top Contributor
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
Aug 24 '09 #2
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
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.
Aug 25 '09 #3
anubhavjha
22 New Member
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.
Aug 25 '09 #4
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
Check it in FF(Fire Fox)... I got some problem when i used AJAX call in IE(Though not similar)...

Regards
Dheeraj Joshi
Aug 25 '09 #5
anubhavjha
22 New Member
Hi Dheeraj,, even firefox and ie shows the same response. and there is a javascript code written that the web application cannot be used on a firefox. can you think of something else.
Aug 26 '09 #6
dgreenhouse
250 Recognized Expert Contributor
Do think that multiple requests are being fired off?

If so, that may part of the bottleneck.

If I remember correctly, IE will open only 2 connections at once.

You might also want to add a timeout in your Ajax callback function so the application is more responsive.

http://ajax.sys-con.com/node/352578

Post your httpRequest and callback function.
Aug 26 '09 #7
gits
5,390 Recognized Expert Moderator Expert
that seems more to be a problem with the JavaScript-code then with the php-code. could you post the JavaScript-code that is relevant for the ajax-call?

kind regards
Aug 26 '09 #8
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
Ok.... I dont know any other solution.

Just post the Java script like GITS told... It may be the culprit....

Regards
Dheeraj Joshi
Aug 26 '09 #9
anubhavjha
22 New Member
@dgreenhouse
Thank you for your reply.

I dont know to check if the multiple requests are being fired off.can you pls provide detail on it.
Aug 27 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1734
by: Trip | last post by:
Please if someone can help me !!! I need client and server code(principle based on AJAX) for next problem: i have 3 <select> tags on html page.(it must be NO page reload(callback) only select(controles) regeneration !!!) In the first <select> goes countries, which must be pulled from some kind of database (whichever you want). after that if i select some country, second <select> must be filled with regions of that country, and when i...
4
4326
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but from within an inline function. Within the AJAX object: this.xmlhttp = new XMLHttpRequest(); this.response = ''; //to contain the response text OR xml var that = this; //since we cannot reference this within the
17
13203
by: petermichaux | last post by:
Hi, Is it possible for an AJAX request to be left open for multiple responses? This could avoid repetitive polling of the server. Thanks, Peter
31
3146
by: Tony | last post by:
I just noticed that prototype.js is one of the files in the Ajax.NET distribution - I'm pretty concerned about this. Does anyone know if this is the same "prototype.js" that is not well-liked around here? If so, do you know if Ajax.NET can be used without prototype.js? -- "The most convoluted explanation that fits all of the made-up facts is the most likely to be believed by conspiracy theorists. Fitting the
4
7469
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole new page that should replace an existing one. I.e when we issue an Ajax request we don't know what will be returned and analyze the response to act accordingly. Now, the way to replace the current document with a new one used to be easy and...
17
11877
by: Arjen | last post by:
Hi, I want to reload 2 divs at one click. Ive tried: <a href = "javascript:void(0);" onclick="show('ajaxrequest.php?action=removefield','div1');show('ajaxrequest.php?action=reloaddiv2','div2')">verwijderen</a> While both seperate actions work they dont when I put them together. Anyone know how to fix this ? My ajax.js with funcition show
5
3102
by: simon | last post by:
hello, I have a server set up on my local (home) network and can not get an ajax application to run on the box. it works fine on our developement server and also works fine locally. I copied the application to the server, setup the website, installed the ajax extensions, also loaded/enabled front end extensions so i could load the site in visual studio 2005. when i attempt to run the site, either from the server or from another pc...
29
3317
by: zalek | last post by:
I am writing application with Ajax in sync mode - xmlHttp.open("GET", url, false). I noticed that in FireFox handler doesn't starts. It starts when I use xmlHttp.open("GET", url,true). I need to use it in sync mode. Any ideas what can I do? Thanks, Zalek.
0
8788
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9290
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9159
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4713
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3151
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2097
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.