a concise shot of dev knowledge
Become a Contributor
Concise shots of dev knowledge

RELATED TAGS

http
communitycreator

What is HTTP Long Polling ?

Siddharth Singh

HTTP Long Polling is a technique used to push information to a client as soon as possible on the server. As a result, the server does not have to wait for the client to send a request.

In Long Polling, the server does not close the connection once it receives a request from the client. Instead, the server responds only if any new message is available or if a timeout threshold is reached.

Once the client receives a response, it immediately sends a new request to the server to have a new pending connection to send data to the client, and the operation is repeated. With this approach, the server emulates a Realtime Server Push feature.

HTTP Long polling visualization

Applications of Long Polling

HTTP Long polling is a mechanism where the server can send data independently or push data to the client without the web client making a request. The information is then pushed as it becomes available, which makes it real-time.

However, it works best if the messages from the server are rare and not too frequent.

RELATED TAGS

http
communitycreator
RELATED COURSES

View all Courses

Keep Exploring

Learn in-demand tech skills in half the time

Copyright ©2022 Educative, Inc. All rights reserved.

soc2