Is Http Streaming Comet possible in Safari?

前端 未结 4 443
自闭症患者
自闭症患者 2020-12-31 12:52

By HTTP Streaming Comet, I mean the \"forever iframe\" / \"forever xhr\" variations that don\'t close the connection after data has been pushed from the server, as opposed t

相关标签:
4条回答
  • 2020-12-31 13:42

    According to Wikipedia, HTTP Streaming comet is supposed to be possible in every browser. "Page Layout with Frames that Aren't", Ajax: The Definitive Guide. O'Reilly Media, pp. 320. ISBN 0596528388, is the reference that is quoted for this information, so maybe this book has a suggestion on how to do this.

    Also http://meteorserver.org/ has a demo which I just confirmed works in Chrome, of a client side library + a server which pushes data to the client.

    0 讨论(0)
  • 2020-12-31 13:43

    It's definitely possible: GMail does it. If you watch the Resources section of the developer tools in the latest Webkit, you can watch it in action. They have a request called "bind" that stays open more or less indefinitely. My understanding is that when new mail arrives, it comes across that connection.

    0 讨论(0)
  • 2020-12-31 13:51

    Yes.

    You need to include a large amount (at least 256 bytes) of junk at the front of the response in order to get Safari to behave.

    0 讨论(0)
  • 2020-12-31 13:56

    Although this is a old post, I did do some search and find the following articles really helpfull http://www.shanison.com/2010/05/10/stop-the-browser-%E2%80%9Cthrobber-of-doom%E2%80%9D-while-loading-comet-forever-iframe/

    0 讨论(0)
提交回复
热议问题