Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a lightweight javascript library that allows the server to push update information to the client reliably and regularly. We use a fixed turn time of 300ms and often there are only about 20 bytes of changes. So doing polling using XMLHttpRequest would imply a huge overhead (3-way tcp handshake, http request headers, http response header).

There area number of alternatives, but they have limited browser support:

  • streaming <script>-tags in another frame (does this work on IE?)
  • MIME multipart/x-mixed-replace responses (Firefox, Safari, Opera only?)
  • WebSockets (removed from recent beta version of Firefox and announced to be removed from Opera 11 because of security issues)
  • Server-sent events (only Opera?)
  • Java / Flash relays (requires the users to have those plugins installed)
  • Polling using XMLHttpRequest (huge overhead)

Is there a website which has recent information on which technology works in which browser? Are there javascript libraries which provide a common cross browser interface that hides the messy details? (Yes, i know that it still requires me to write multiple server sides, but that is rather easy. And more important it is easy to write automatic tests for the server sides).

share|improve this question
up vote 7 down vote accepted

You should look at

It combines almost all the technologies you describe in a consistent API

share|improve this answer uses websockets or httprequest polling internally (depending on what's available) – oberhamsi Jul 7 '11 at 14:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.