What Is Long Polling?
Long polling is a technique where the client makes a request that the server holds open until new data is available (or a timeout occurs), then the client im...
Published October 9, 2026
Long polling is a technique where the client makes a request that the server holds open until new data is available (or a timeout occurs), then the client immediately makes another request, simulating real-time updates over plain HTTP.
Why it exists
- Before WebSocket was widely supported, applications still needed a way to get near-real-time updates without constantly polling on a fixed interval
- Long polling reduces wasted "nothing changed" responses compared to simple fixed-interval polling, since the server waits until there's actually something to report
How to apply it
- Use long polling as a WebSocket fallback for environments or older clients where persistent WebSocket connections aren't reliably supported
- Be mindful of how many open connections this holds on the server, since each waiting client ties up a connection until data arrives or it times out
FAQ
Is long polling still relevant with WebSocket widely supported?
Less often needed today, but it remains a useful fallback in restrictive network environments (like some corporate proxies) that block WebSocket connections entirely.