Suyash Mohan
Suyash Mohan

Reputation: 320

How to disable cookies in Header while creating websocket?

While creating WebSocket on client side, browser also sends cookies with Headers. Is there are a way to disable this behavior.

I read WebSocket documentation on Mozilla Dev Net (https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) but couldn't find any documentation regrading this.

Upvotes: 2

Views: 1457

Answers (1)

vtortola
vtortola

Reputation: 35905

No, there is no way to do that.

Cookies won't be send if the websocket server is in another domain. Or if they are in another subdomain but the cookie is not allowed in subdomains.

How do browser cookie domains work?

Upvotes: 1

Related Questions