Take the 2-minute tour ×

I'm interested to know the implementation of the 'new message' in gmail for example. I know that ajax is used, but what else it is used on the server and client side. Can you explain me the scenario?

Gmail is just a sample to sustain my question. I'm interested about the cheapest solution which allow to display new content in asynchronous manner without a user triggered event.

If you know a resource which explains the optimal way of implementing such app I will appreciated.


share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

There is a server push technology going on there or maybe websocket. Allowing the server to notify the client when the server is being updated instead of ajax sending request every few seconds to check for changes.

Try searching for comet or Ajax Push. And also websocket.

share|improve this answer
add comment

Technique is called long polling, which basically means maintaining the request connection open. In particular case of AJAX name Comet was coined for it's various implementations.

With introduction of WebSockets this can be replaced by normal, persistent two-way communication.

share|improve this answer
add comment

Your Answer


