IFrame + Script Tags = Portable Comet

Comet Takes to IE Like a Fish Takes to Acid Comet - or HTTP Streaming, if you will - is a little sensitive when it comes to portability, and I'll give you four guesses which major browser is causing the grief? Yeah, IE makes it difficult for two reasons: (a) IE's XMLHttpRequest component doesn't tell […]

Comet Takes to IE Like a Fish Takes to Acid

Comet - or HTTP Streaming, if you will - is a little sensitive when it comes to portability, and I'll give you four guesses which major browser is causing the grief? Yeah, IE makes it difficult for two reasons: (a) IE's XMLHttpRequest component doesn't tell you anything about the response until the connection has closed - even if you try polling it instead of relying on onReadyStateChange, you'll still get an empty string (Try it); (B) Okay, switch to plan B and inspect IFrame content - we can't rely on onload, which is only called once at the end, so we must poll. But no, polling won't help either, as the IFrame content remains empty until (you guessed it) the connection is closed. (Try it). | x

IFrame, Portable Comet, XMLHttpRequest, Push, Streaming, AjaxPatterns