How is GMail Chat able to make AJAX requests without client interaction?

chat picture chat · Apr 9, 2009 · Viewed 13.7k times · Source

All HTTP responses require the client to initiate them, even those made using AJAX. But GMail's chat feature is able to receive messages from other users, even when I'm just sitting in my comfy computer chair watching but not interacting with the browser. How did they do it?

Answer

Pablo Fernandez picture Pablo Fernandez · Apr 9, 2009

That tech is known as "comet", but also as "server push", "reverse ajax", etc.

It's about pushing data from the server to the browser, keeping an http connection alive. Find more info on it on the wikipedia article (English version).

Also here's a pretty good presentation with Joe Walker from DWR, where he talks about comet.