JavaScript · Senior · Question 15 of 75

How do Server-Sent Events differ from WebSocket?

Explanation

SSE (EventSource) is simpler: plain HTTP, automatic reconnection, text events - enough for notifications and streaming responses. WebSocket is needed for frequent two-way exchange (chats, games, collaborative editing) and supports binary data.

Further reading

Problem with a question

JavaScript · Senior · question 15

Test yourself

Take the JavaScript · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz