Server-Sent Events
A long-lived 1-way connection where the server pushes events to the client whenever it wants.
Example
A football scoreboard gets each goal over SSE without the user asking.
Test yourself: Server-Sent Events
Real time: long polling, WebSockets and SSE
SSE is ___: the client only receives over that connection.
The server can send 100 events; the client can't answer over the same channel.
Real time: long polling, WebSockets and SSE
An app shows new notifications to the user, who only reads them. Which technique is enough and simpler?
Only the server has something to send: SSE pushes it in under 1 second, with less complexity than WebSocket. Reloading every minute would mean up to 60 seconds of delay.
0/2
â–¶ Play