sockjs/sockjs-client — pull request #129 by n1mmy (2013-07-25 03:06:04+00:00)
Title: Add cachebusting parameter to /sockjs/info requests.

Not sure if this is the best approach, but it fixes our immediate problem.

To replicate the behavior yourself, use Chrome load a SockJS app that has a relatively high latency (eg, deploy to a server far away, or use cell phone connection, or add artificial delay in your server with setTimeout), then hit reload a lot. The timing is a little finicky, you're aiming to hit reload sometime after the sockjs info request has started but before it has received a response from the server. If you hit reload at the right time, the tab is now 'poisoned' and will never establish a sockjs connection to the server. New tabs are fine. Clearing the browser cache or restarting the browser also fixes it.

This patch adds a random cachebusting url parameter to the /info request. I believe all the other requests that sockjs makes have already some sort of random string in them.