Add cachebusting parameter to /sockjs/info requests. #129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.