SkillSprout
Chapter 28

Long Polling vs WebSocket vs SSE

Plain web requests only let the client ask; the server cannot speak first. This chapter covers the three common ways to push live updates to clients and when to pick each.

1Polling and Long Polling
Intermediate
3 min
2WebSockets, Server-Sent Events and Choosing
Intermediate
3 min

Chapter quiz

Long Polling vs WebSocket vs SSE · 5 questions

  1. 1.Why can't a server in plain HTTP just send updates whenever it wants?

  2. 2.In long polling, what does the server do when there is no new data?

  3. 3.Which technique is two-way over a single persistent connection?

  4. 4.A live sports score page only pushes data from server to browser. Best fit?

  5. 5.What lets a client recover missed events after reconnecting?

0 of 5 answered