Reputation: 5174
I wrote an app that uses websocket and I am running into a weird problem.
If I run my app in Chrome and try to reconnect, it cannot reconnect to the websocket.
However if I use incognito Chrome, it works every single time.
Is there a subtle difference between the websocket in Chrome vs incognito Chrome? Some sort of cache control maybe?
EDIT: I'm running Chrome 13. Sorry I can't provide any sample code as it reveals my app but the gist of the issue is that incognito Chrome can establish a connection to my server EVERY TIME, but regular Chrome succeeds once, then fails all subsequent attempts. Weird, right?
Upvotes: 7
Views: 3122
Reputation: 76
Websockets make a usual HTTP query to initially connect to server. HTTP query also has cookies in the request. In my case, the cookies were huge, and incognito mode doesn't have it, only session_id, so cleaning the cookies in regular Chrome did the deal.
Upvotes: 2
Reputation: 9
I had the same issue. This may actually deal with the framework you used on the server side. My only suggestion not knowing your framework. Make sure that on the server you are using is correctly managing which socket you are receiving and sending data. IE the same socket.
Upvotes: -1
Reputation: 63
I guess this has all to do with the latest hybi 10 draft spec. Since Chrome 14, only this spec is supported. The older specs aren't anymore.
Upvotes: 0