What it is
A persistent connection between a browser or app and a server over which data flows both ways without new requests. Chats and live updates need it.
Why it matters for business
Data arrives immediately without reloading the page: a chat, an order status, a live counter. For ordinary forms and orders, regular requests are enough.
Where it helps a business
- Data must arrive immediately without reloading the page: a chat, an order status, a live counter.
How it works
A browser or app opens one connection to the server and keeps it open. Data flows over it both ways without new requests, which is what chats and live updates need.
Common problems
- The proxy has to let it through. Without the right nginx setup the connection breaks at the entrance.
When you do not need it
For an ordinary website, forms and orders, regular requests are enough. WebSocket is for data that flows continuously in both directions.