Bundled JavaScript goodness!

bundle-javascript.png

We’ve had the Flash fallback option on the Pusher site since the beginning (courtesy of the fabulous websocket-js library), it has always been a bit fiddly to go through that extra step to get things up and running though. Now we have bundled up and minified the web-socket-js library and included it with our hosted \[…\]

Introduction

We’ve had the Flash fallback option on the Pusher site since the beginning (courtesy of the fabulous websocket-js library), it has always been a bit fiddly to go through that extra step to get things up and running though.

Now we have bundled up and minified the web-socket-js library and included it with our hosted Pusher library so you now need only include a single file. This is open source, and anyone is free to fork it and contribute changes.

The versioned stable build of this is hosted on our service, so it really should be as easy as including one file (http://js.pusherapp.com/1.2/pusher.min.js), and doing a little bit of configuration!

Upgrading your apps

Upgrading is not strictly necessary, but you’ll probably find your pages are a little bit quicker if you do. Just remove FABridge.js, web_socket.js, and swfobject.js files from your server – but keep the WebSocketMain.swf flash file (you still have to host that for now).

Replace the references to the files in your HTML with:

1<script src="http://js.pusherapp.com/1.2/pusher.min.js">
2</script>
3
4<script>
5  WebSocket.__swfLocation = "/WebSocketMain.swf"
6</script>

And you should be larfing.

If you haven’t done so already, go on, create a free Pusher account and let us know what you think!