7

How does Facebook's Chat Window Remains open and in the same place When you navigate through pages

Please before you answer:

1-I'm aware of Ajax very well and the current implementation in Facebook is not normal Ajax like it used to be in the past.

2-The URL of the page changes completely not the Hash part, and the whole page reloads but not the Chat window or panel.

I Found that the URL changes through this JS Part:

history.pushState({},"New Title Goes Here","http://facebook.com/Something");

But what about the data itself how doesn't it come ? the Network->XHR in Firebug or Chrome displays nothing in the XHR. so I guess it's not Ajax.

4

1 回答 1

1

对我来说看起来像很多ajax。

在此处输入图像描述

他们在重新加载聊天窗口时是有选择性的。即:如果您转到帐户设置和其他较少访问的页面。

对于聊天窗口本身的加载,我相当肯定他们使用长轮询(彗星)。

于 2012-06-08T17:00:57.260 回答