Hi there,
  I have little experience with ajax and I was wondering about the
following scenario:

Client side sends an http request
Server starts processing the request, returns a response saying "In
progress" (and flushes the buffer)
Server keeps working on it
Server sends in the same response "Job complete" and terminates.
--

Normally, an ajax call would only be able to read the response at the
end of this scenario.  Best would be to intercept the "In progress"
and do some client-side stuff (tell the user) and wait for the rest of
the response and do stuff each time the server sends something new
(like "10% complete", etc..).

I believe this would be done using the keepalive keyword but I'm not sure.

Another way is to make a request every seconds (or more) to query the
job status, but this is the ugliest way of doing this IMO (wastes time
and server resources).

So, is it possible to combine the power of server flushes and ajax
reading as it downloads?  And how (if it uses functions, can you tell
them to me as keywords so I can document myself further?)

Thanks,
  Simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to