16

On Facebook you can browse the site without affecting the floating chat windows. Seems like if the main page was inside an iFrame and the footer and chat windows where floating outside.

alt text
(source: k-director.com)

Is the main content inside an iframe or are the footer and chat windows the ones inside an iframe?

The later doesn't seem possible because int this case when you click in a link in the main page everything would have to reload, including the footer iframe.

If you refresh the page the chat windows are reloaded, but if you browse the site by clicking links they are not.

Thank you.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Santiago Corredoira
  • 47,267
  • 10
  • 52
  • 56

4 Answers4

17

If you install FireBug and enable the net monitor for Facebook, you'll see that when you click most links inside the application, you're not doing a full page refresh, but rather an AJAX call which updates the page with the new content.

It looks like a new page, but in reality you're on the same page with just about everything but the chat-bar replaced.

Fudgie
  • 302
  • 1
  • 3
1

Probobly just an absolutely positioned div, containing a scrolling div for the content. Ajax would provide the content.

Sprintstar
  • 7,938
  • 5
  • 38
  • 51
0

The chat windows do indeed refresh when you load a new page, they maintain their viewstate however (open/close/chat history).

Tequila Jinx
  • 438
  • 1
  • 3
  • 9
0

It's an absolutely positioned div, positioned at the bottom of your browser window. It's not hard, I cloned the Facebook chat for ClockingIT from scratch in a weekend.

Fudgie
  • 302
  • 1
  • 3
  • its easy to set the div fixed in the bottom of the page. What I am curious about is how they are able to let you browse different pages without reloading the chat divs. – Santiago Corredoira Feb 16 '09 at 20:42