469,281 Members | 2,450 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,281 developers. It's quick & easy.

Status bar says, "Transferring data ..." even if Ajax response is complete.

1,654 Expert 1GB
I have a page working on Ajax. The problem is, after doing many changes using Ajax (like uploading, changing name, adding to favorites etc), the status bar starts behaving unexpectedly. Even when nothing is being transfered, it displays Transferring data from localhost... and that too continuously. The progress bar also shows that its working, and its all green (filled).
It doesn't even occur on a particular action. Its just random.

This is not at all causing any problem to the working of the page, but it doesn't look good.

Is there any solution for this?

Mar 25 '08 #1
2 2555
428 256MB
Try returning document.close() when the request has completed(readystate==4)

Often when you script an http request(with AJAX or a script or image or iframe src change, or an object data call) , and you handle the default onload or readystatechange, the browser leaves it to the handling script to flush the buffer.

Calling document.close() has no penalty, unless you are in the middle of a transfer.

Another posibility is that some of your requests are expected to return a value to the server, like a receipt. This can be added by the server the ajax is talking to. You may need to explicitly destroy the AJAX instance after it returns a response, and create a new object for the next request to these resources.
Mar 26 '08 #2
1,654 Expert 1GB
I think I missed this...

xmlHttp.setRequestHeader("Connection", "close");
Mar 28 '08 #3

Post your reply

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

By using this site, you agree to our Privacy Policy and Terms of Use.