You need SSE (events sent by the server). The only drawback is that it is not yet supported by any of IE, so you will probably need to implement some discovery functions (with, for example, modernizr.js) and use either a long poll or SSE , depending on which whether your browser is SSE (or just use SSE polyfill , there are many thanks).
Why would you probably want to implement both methods instead of going with a well-supported long poll ? Server-sent events and polling .
Here is a tutorial on PHP implementation: http://www.w3schools.com/html/html5_serversentevents.asp
And a good explanation of what SSE gives:
HTML5 introduced an API for working with server events. The basic idea of SSE is simple: a web page subscribes to an event source on a web server that sends updates streams. The web page does not need to constantly check the server to check for updates (as was done with the AJAX poll) - they automatically appear. Note that the client-side script can only listen for updates, it cannot publish anything (compare this to web sockets where the client can subscribe and publish). Therefore, all publishing functions are performed by the server.
source share