Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook and Ajax

Tags:

ajax

facebook

How does Facebook Ajax work? 2-3 months ago they were using # but now the whole addressbar is changing.

like image 976
borayeris Avatar asked Apr 26 '11 15:04

borayeris


People also ask

What is Ajax?

What is AJAX? AJAX = Asynchronous JavaScript and XML. In short; AJAX is about loading data in the background and display it on the webpage, without reloading the whole page. Examples of applications using AJAX: Gmail, Google Maps, Youtube, and Facebook tabs.

Is Facebook Ajax based or HTTP based?

Yes Facebook is fully AJAX based, unless you disable JS in your browser. Yes. You are absolutely correct. Facebook uses ajax calls to make HTTP requests without refreshing the entire page when an action occurs. Obviously, when you upload or post a status without a refresh, that’s AJAX working.

What are the methods of Ajax in jQuery?

jQuery provides several methods for AJAX functionality. With the jQuery AJAX methods, you can request text, HTML, XML, or JSON from a remote server using both HTTP Get and HTTP Post - And you can load the external data directly into the selected HTML elements of your web page!

What are the best ways to improve the performance of Ajax?

For sites like Facebook, Quora, Twitter, that are generally social and update near-constantly, loading more data periodically through Ajax can improve the experience. Even those three sites, however, don't load new data in the same way: Quora updates stats while on a question page, and brings you notifications about activity on other pages.


1 Answers

The first approach used is called "Ajax Crawling" (also refer to this answer).

But I think the new approach you are talking about is just the HTML5 History API. Github is using this approach for their tree browsing, and you can learn more about it here. (I recommend ALL readers to read and watch the video as it's very informative)

EDIT:
Just to point out that Facebook is definitely using the HTML5 History API (direct link from the previous github article).

like image 146
ifaour Avatar answered Sep 20 '22 13:09

ifaour