scrap pad


"Comet" is the name being given to javascript that provides "push" data in web pages. A web app using Comet would receive new data from the server as it is made available, rather than by polling the server to check for new data every x seconds or only updating in response to user actions (an AJAX-y strategy).

Actually, Comet-style scripts still poll the server, but the server leaves the script's HTTP request open and doesn't respond until there is new data to send (or the request times out, after something like 200-300 seconds); when the response is received, a new request is opened. Regular polling asks the server for new data and immediately gets a response (either something saying "no new data", or the new data), then waits x seconds and makes another request.

The entry on Comet at wikipedia is straightforward, see also this post on Comet for more context. There is an interesting graph on Comet latency at the Comet Daily blog. (via)


who I am