For a new interface on our application I decided that it was necessary to forego websockets and choose comet for its much-wider support. I realized there are several techniques, and I need to ensure I choose the right one.
The question: Does the AJAX polling method release chunked data as soon as it's received or wait until the request closes?
If not, is there a way to use the iFrame technique and eliminate the browser spinner of death?
Thanks!
Comet through ajax (ajax long polling) only makes data available to the front end of the application after the request is complete. It's useful for when you have discrete packets of data that you need to send at irregular intervals. If you want to chunk your data, then simply finish the request after the first chunk and then have the client immediately ask for another chunk. If there's another chunk ready, serve that right away; if there isn't, then just make the client wait until there is.