Skip to content
uencoder

Long Polling

Long polling is an HTTP technique that emulates real-time push: the client's request stays open until the server has data to return, and the client immediately re-issues a new one.

Purpose

It emulates server push where WebSocket/SSE are unavailable, offering the widest compatibility.

Mechanism

The client sends a request; the server holds it without responding until an event or timeout, then replies. On receiving the response, the client sends a new request at once, keeping one "pending" request open at all times to emulate a push channel.

Use cases

  • Compatibility-first real-time communication
  • Push for legacy browsers
  • IM applications

Related tools

References