Does Websocket work in Chrome incognito, but not in regular Chrome?

I wrote an application that uses websocket, and I ran into some strange problem.

If I run the application in Chrome and try to connect, it will not be able to connect to websocket.

However, if I use Chrome incognito, it works every time.

Is there a subtle difference between websocket in Chrome vs. incognito Chrome? Maybe some kind of cache control?

EDIT: I am running Chrome 13. Sorry, I can’t provide any sample code because it shows my application, but the crux of the problem is that Chrome’s incognito can connect to my server EVERY TIME, but normal Chrome succeeds once. then all subsequent attempts fail. Strange, right?

+4
source share
3 answers

Websockets make a normal HTTP request for the initial connection to the server. The HTTP request also has cookies. In my case, the cookies were huge, but the incognito mode did not have it, only session_id, so clearing the cookies in normal Chrome did the deal.

+1
source

I assume this is relevant to the latest specification of the hybi 10 specification. Starting with Chrome 14, only this specification is supported. Older specifications no longer exist.

0
source

I had the same problem. This can actually deal with the framework you used on the server side. My only suggestion is not knowing your scope. Make sure that the server you are using is properly managing which socket you receive and send data to. IE is the same socket.

0
source

All Articles