|
Say I have this page on an IIS server (or any similar server). There is a loop where in it sends some response with each iteration. I need to capture that information and display it on my web page which is ajax-handled. The thing here is that the process at the server is still running and simultaneously sending out information. Can I trap that information using ajax?
Can we use ajax to obtain interim data?
while waiting for an ajax call to finish you get several readyState == 3 results, you're normally waiting for the readyState == 4.
when you get a 3, you have access to the text currently sent... but not the full xml parsed info.
So the answer is yes, with a small reservation!
Can we use ajax to obtain interim data?
No. The connection on the server needs to be free (closed) in order to send data to the client. You should perhaps look into re-developing the system, so it pauses at certain intervals or milestones to update the progress for the client.
Can we use ajax to obtain interim data?
I *kinda* understand where you're going with this, but it's about as clear as mud! Could you simplify / clarify please??
Are we talking about different pages on the *same* webserver?
|