O'Reilly logo

Mastering Dart by Sergey Akopkokhyants

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

AJAX long polling request

From a client perspective, the AJAX long polling request looks similar to normal one. An important difference between them on the server side is that if the server doesn't have any information available or the client, it holds the request and waits for information to become available or for a suitable timeout, after which a completed response is sent to the client. The long polling requests reduces the amount of data that needs to be sent because the server only sends data when it is really available.

The long pooling request is useful in the following cases:

  • When your solution must work in old web browsers
  • When the data traffic between the client and server is low
  • When the implementation is very simple

The advantages of using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required