Jump to content

Recommended Posts

I m quite curious about facebook,  below are the queries i have.

 

1. How status bar of facebook remains unrefreshed when pages are navigated? Well its possible that they have used ajax to load pages without anything refresh, but i can see  page loading bar in browser's statusbar if any link is clicked.

 

2. How it can manage to be so fast when comment to on post is made and is instantly visible by another user? Even in poor internet connection, facebook seems to be very fast in executing query.

 

3. They are using loads of javascript timer to call loads of ajax functions to change contents automatically, how it still manage to be so fast.

 

Can anyone can explain?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/178583-questions-regarding-facebook/
Share on other sites

There not using Ajax for everything. You still make a normal request for most pages.

yes but still why the facebook's statusbar remains unchanged despite we see loading stuffs in browser's statusbar..thats my curiosity :) or are they loading contents in iframe??

are they loading contents in iframe??

 

Yes. A simple view source would reveal that to be the case.

 

No, the iFrame is solely used to load content from an external site (something about Ajax not supporting external sites in certain functions).

 

What Facebook does to keep the chat-bar static, is to load each new page's content into the "main" div on the page, thereby creating a sort of iframe-like effect. If you look at the address-bar when you navigate around, you can see the hash (#) changing with every link you click, that data after the hash is used to tell their Ajax scripts where to get the content from.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.