How does GMail implement Comet?

前端 未结 1 872
太阳男子
太阳男子 2020-12-13 11:17

With the help of HttpWatch, I tried to figure out how GMail implements Comet.

I login in to GMail with two accounts, one in IE and the other in Firefox. Chatting in

1条回答
  •  有刺的猬
    2020-12-13 11:53

    Per this article,

    So what is the solution used by Google Gmail?

    The solution is really simple, straight forward and very portable! What Gmail did is requesting an endless html page that contains streams of Javascript portions. Give it a try, It’s very powerful. So, we will have on the client side a js file that processes the responses, and another endless html that contains the Javascript Streams.

    The rest of the article goes into much more detail, including an exploration of alternatives as well as the specific one picked by GMail.

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