I don’t understand, how can long polling be helpfull at all if XMLHttpRequest gives no access to partial content???
There is no difference where to wait, on client, or on server. The responce can be shown only upon complete. So, both short polling and long polling appear identical.
For example, if I am writing chat application, I can both send GET requests for normal dynamic service or for Comet service — the result be identical, because I can’t get a content untill servel finish response.
Where is my mistake?
Update 1.
So the only sense of “comet” notion is that servlet (for example) should just wait as much as possible before answering trying never say “no data”?
Then what such interface as CometProcessor in Tomcat API exist for?
Whenever a new chat line comes in, the server completes the long poll request, and the client issues a new one. So you simulate support for partial content by reissuing the request each time part comes in.