The Facebook footer bar is an iframe, so why it doesn't it reload with the rest of the page?

I want to know how Facebook is doing their iframe footer bar. I mean, i know they have an iframe on footer, but i want to know how they are reloading pages without reloading the iframe also, 'cause the iframe always stick there even though the page does reload again. Any ideas/knowledge?

EDITED:

Try clicking on a link which is different section and it changes the url and so far i know, if you try to change the URL, then the page will reload again. Also, try using Facebook on Chrome: you will see it reloads on every new page. It's not AJAX, because the URL wouldn't change if it was AJAX (do little research on URL changing, you will know).

13.10.2009 19:34:52
Shog9 13.10.2009 19:56:50
The link does change, but only after a "#" which doesn't foce a reload! It is still AJAX.
powtac 13.10.2009 22:26:37
1 ОТВЕТ
РЕШЕНИЕ

Well, powtac pretty much gave you the answer: Facebook doesn't reload the whole page when you click a link, it requests the new content via XMLHttpRequest and refreshes only those portions of the page that change.

It's pretty slick about this: a naive implementation might not use real links at all, thus preventing you from opening, say, a different Facebook tab in a separate browser tab.

This technique - intercepting link navigation - also allows Facebook to use custom prompts when you try to navigate away without saving, and re-write paths as fragments, allowing it to track the current location in the URL without reloading the page.

FWIW, this question has already been asked and answered - see: How are the facebook chat windows implemented?

3
23.05.2017 12:11:21
Read the first chapter of the Wikipedia article... I don't want to copy & paste it.
powtac 13.10.2009 19:57:42
try clicking on a link which is different section and it changes the url and so far i know, if you try to change the url, then the page will reload again. also try using facebook on chrome, you will see it reloads on every new page. its not ajax, because url wont change, if it was ajax (do little research on url changing, you will know)
Basit 13.10.2009 21:16:57
@basit: see my edit. It only changes the URL fragment, which doesn't force the page to reload.
Shog9 13.10.2009 21:41:31
@shog9: try changing url somedomain.com/subpages page to somedoain.com/subpages/page2 - you will see it will reload and i tried facebook, it changes url and not its fragment (#something)
Basit 13.10.2009 22:42:30
Give me a real example: what URL can you click on Facebook, that keeps you on Facebook, and doesn't just change the URL fragment...
Shog9 14.10.2009 00:02:05