3 ms·
It appears my usage is a little different than wikipedia. Apparently "Comet" can mean multiple things. I meant "streaming Comet", which is in my experience what
by paulddraper 8y ago
It appears my usage is a little different than wikipedia. Apparently "Comet" can mean multiple things. I meant "streaming Comet", which is in my experience what most people mean.
Long polling: (1) Request (2) Wait (3) Receive an event. (4) Go back to #1.
Streaming Comet: (1) Request (2) Wait (3) Receive an event (4) Go back to #2.
Rather than getting a raw response from the server in a request, streaming Comet loads the response in a iframe. The response is streaming HTML and has a series of <script> tags that post events to the parent window.
It's arguably easier to manage and scale (no missed events, no need to find the same server again), though it certainly looks a little odd.