Push notifications from server to user with PHP/JavaScript

In modern browsers, Websockets or in older browsers, “long polling“. There are also libraries that can abstract some of this (like comet).

A very common library in use now is socket.io which automatically connects with the best technology available, using webSockets if available and falling back to other technologies like long polling if not available.

Some other references:

How do I implement basic “Long Polling”?

COMET (server push to client) on iPhone

More on Long Polling

Is there a difference between long-polling and using Comet

Pushing the web with websockets

Oh HTML5, Push Data to my Mobile

Leave a Comment