What you're talking about is a “poll” when your client-side code will query the server every X seconds to check for updates.
This is an easy to implement solution, so you see it so often. However, the best solution is to use a comet.
In 2006, Alex Russell coined the term "comet" to define the way in which a client makes both an HTTP request to a server and the server keeps this connection open indefinitely. With this open connection, the server can then update the client in response to updates.
When a response is received, the client immediately opens a new, durable HTTP connection.
"Comet" , , , .
Comet Daily , - , Comet. , Firebug Chrome Debugger, / .
http://cometdaily.com/2009/10/23/concrete-comet-examples/