On 12 Apr 2007, at 20:04, Simon wrote:

> 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?)

Persistent connections are still in a very early stage and a  
periodical updater (so a request every x seconds) is probably the  
best way to go. If you still insist on persistence, you can check out  
Comet, Meebo uses it for example, as does GTalk. More info: http:// 
www.cometd.com/ and http://ajaxian.com/by/topic/comet/

If you're looking into upload progress, you have a few other options,  
such as SWFUpload, where the Flash movie keeps track of the upload  
progress (on the client side).


Best regards

Peter De Berdt


--~--~---------~--~----~------------~-------~--~----~
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