Home of Ebyan Alvarez-Buylla

Comet Long Polling with PHP and jQuery

Comet Long Polling with PHP and jQuery

Comet describes a number of techniques with which a web server may push information to a client in a non-transactional format. Long Polling is one of such techniques, in which a browser’s request remains open until the server has information to send.

Long Polling is particularly useful in semi-synchronous applications, such as chat rooms and turn-based games, and is straightforward to implement with PHP and jQuery:

Multiple AJAX Calls in YUI 3

Multiple AJAX Calls in YUI 3

Although my preferred JavaScript framework is jQuery, I’ve been using YUI 3 professionally quite a bit in the last months. Recently, I had the need to handle multiple concurrent AJAX calls and bind them to their own event handlers. This can be accomplished with: