Facebook chatbox does not reload between pages

I watched this function on Facebook that when you have a chat window open in the lower right corner and you go to another page, say your friend’s profile or some page of your photo collection on Facebook, there’s no reload in the chat window, it stays where it is (as if in a separate layer on top of the background page).

So, of course, I thought that Facebook does not reload the page as such, it uses history.pushstaterelated functions to load content asynchronously and dynamically change the URL (Firebug confirmed this if you click on one of your friend’s name and goes to the profile page your friend, this is actually a request GETthat is running). Since there is no loading of any page, the chatbox can simply be idle as it is.

However, it is pushstatenot supported IEuntil version 10. However, it works fine in IE9. So can someone tell me how they do it? Do they use the API historyat all or something else?

+5
source share
1 answer

. Facebook, - History.js

History.js API- / HTML5 (pushState, replaceState, onPopState) . , , replaceState. jQuery, MooTools Prototype. HTML5 , URL- , . HTML4 onhashchange.

+7

All Articles