What is WebSocket?
A persistent, two-way connection between browser and server.
A protocol that upgrades an HTTP connection into a long-lived socket where both sides can push messages at any time — unlike HTTP request/response where the client must always ask first. Used for chat, live dashboards, multiplayer and collaborative editing.