Did Facebook refreshes using ajax to get updates

65 views Asked by At

In Facebook how updates/notifications/Chat works.

Using ajax we can send request to the server(Example: for inserting records into database).

Then how these records are pushed by server to other users.

Did facebook page keep refreshing with some interval or is there any technique to do so.

Websockets they doesn't use.Then how they are achieving such a good and speed communication between users.

1

There are 1 answers

0
Rakesh On

Comet is a procedure used by facebook to display notifications.

An application using streaming Comet opens a single persistent connection from the client browser to the server for all Comet events. These events are incrementally handled and interpreted on the client side every time the server sends a new event, with neither side closing the connection

Specific techniques for accomplishing streaming Comet include the following: Hidden iframe, XMLHttpRequest, Ajax with long polling, XMLHttpRequests long polling, Script tag long polling

Source Wiki