Faye 0.6.4 keeps your WebSockets healthy

Update: Please skip past this version and use 0.6.5, which fixes a bunch of WebSocket string encoding problems.

With the release of Firefox 6, and the pending release of Chrome 14, we’re beginning to see people using browsers that move past the now-expired draft 76 of the WebSocket protocol and use one of the latest revisions of the protocol, which is now expected to be finalized without too many more adjustments. Those of you using Faye 0.6.3 or earlier will see the connection falling back to plain HTTP long-polling in these newer browsers since the new protocol is very different to the old one and their attempts to connect to Faye’s old socket server fail.

Faye 0.6.4 is a bug fix release, although fixing the ‘bug’ involves quite a lot of new code. It includes support in both the Node and Ruby versions for the WebSocket protocol in Chrome 14 and Firefox 6, so users of new browsers should continue to see minimal latency from your Faye apps.

If you want to test it out, you can grab it using gem install faye or npm install faye. There are no API changes but the introduction of new protocols means stuff might break. If you find bugs, please report them on GitHub and roll back to 0.6.3. Faye will continue to fall back to HTTP in cases where WebSockets are not usable, so your users shouldn’t notice any problems.

If you’ve enjoyed this article, you might enjoy my recently published book JavaScript Testing Recipes. It’s full of simple techniques for writing modular, maintainable JavaScript apps in the browser and on the server.