This post discusses WebSocket lifetime and how to handle prematurely closed connections.
A number of browsers support WebSocket per-message compression out of the box. This post shows how it can be used in ASP.NET Core.
This post focuses on Cross-Site WebSocket Hijacking vulnerability and how to protect against it.
WebSocket is the closest API to a network socket available in browser. This makes it probably the most flexible transport which a web application can use. That flexibility comes at price. From WebSocket perspective the message content is opaque. This means that client and server must agree on application subprotocol. WebSocket provides a simple subprotocol negotiation mechanism which helps in that task.