Node.js · Middle · Question 69 of 75
When are Server-Sent Events (SSE) a better choice than WebSockets?
- 1When the client and server both send many messages
- 2When you need binary data in both directions
- ✓Correct answer: When the server only needs to push updates to the client, over plain HTTP
Explanation
SSE uses a normal HTTP response with Content-Type: text/event-stream. The browser's EventSource reconnects automatically. WebSockets are full duplex.