Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

TY

share|improve this question

2 Answers 2

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.