The name of this type of technology is Push (Push ), where the server initiates a transaction with the client (in this case, the browser).
It's the inverse of what we usually use in web applications, where the action is on the client side (Pull ).
In this mechanism, the client state changes upon request from the server. There are several ways to implement this behavior in modern browsers:
-
Traditional Polling : Your application asks from time to time, via XMLHttpRequest or equivalent, if the server has any status updates.
-
Long-polling : Your application maintains an open parallel request that is only closed when the server sends some content.
-
Forever Frame : Same as Long-polling, but without the overhead of creating / destroying client control objects, and usually with a permanent connection.
-
WebSockets : A relatively new protocol (2011) that operates in parallel to HTTP and optimizes bidirectional communication between client and server.
For more information, check Wikipedia entry .