Firefox recently removed a preference that allowed WebSockets to be disabled by the browser. This add-on provides a simple way to disable them through an item in the Web Developer menu.
Once installed, simply click the relevant item in the Web Developer menu to enable or disable Web Sockets for all browser windows.
Note: you will need to reload each page before the change will take effect.