Reputation: 8794
I would assume that there is an AJAX request on the client side that polls for updates, but it is amazingly tight response. Can someone provide more insight into any tricks that they may be doing in the protocol?
Upvotes: 2
Views: 749
Reputation: 28850
Two methods generally used in this case
Polling: the Javascript code polls the server every (for instance) 10 seconds to see if there is some fresh news to show
Persistent connection: the XMLHttpRequest request is performed by the client, and the server keeps the connection until there is some news (replies data to client in this case), or if a given time-out is reached - then the client tries again and so on.
Google probably uses the 2nd option, which is replying and updating faster.
Upvotes: 2