Long Polling
ELI5 — The Vibe Check
Long polling is a hack to fake real-time updates before WebSocket existed. Your client asks 'any new messages?' and instead of the server immediately saying 'nope,' it holds the connection open and waits. When a new message arrives, it responds. Then you immediately ask again. It's awkward but it works.
Real Talk
Long polling is a technique where the client sends an HTTP request and the server holds it open until new data is available or a timeout occurs, then responds. The client immediately sends another request. It simulates real-time communication over HTTP without WebSocket support.
When You'll Hear This
"Old chat systems used long polling before WebSocket was available." / "Long polling adds unnecessary overhead — use WebSocket or SSE instead."
Related Terms
Server-Sent Events
Server-Sent Events (SSE) is like subscribing to a news feed from the server.
SSE (Server-Sent Events)
SSE is just the abbreviation for Server-Sent Events. Same thing — the server streams updates to you over a persistent connection.
WebSocket
WebSocket is like upgrading a walkie-talkie from push-to-talk to a full phone call.