Real-time Communication

Real-time communication in a browser involves establishing a persistent connection between a browser and a server, allowing for immediate, bidirectional exchange of data without the need for page refreshes. This is crucial for applications that require instant updates, such as online chat, collaborative editing, and online-gaming.

WebSocket

WebSocket is a full-duplex communication channel over a single TCP connection. Provides a low-latency, efficient way to exchange data between client and server. It can handle both text and binary data. Widely supported by modern browsers.

Server-Sent Events (SSE)

SSE is a simple server-to-client unidirectional communication mechanism. The server pushes updates to the client without the client needing to explicitly request them. Suitable for scenarios where the server needs to send frequent updates to the client.