Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 515527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:38:14+00:00 2026-05-13T07:38:14+00:00

I asked a previous question about keeping up a constant link with a database,

  • 0

I asked a previous question about keeping up a constant link with a database, and someone suggested long polling. I found a small tutorial with a skeleton, but I don’t understand some things.
The page is here: https://web.archive.org/web/20120306031249/http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=575

First, what happens after 30 seconds? Does it quit?
Second, why does it sleep if there’s no new content.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:38:15+00:00Added an answer on May 13, 2026 at 7:38 am

    In that example, the loop in the server script will iterate no more than twice. So the request won’t be open too long.

    You could just as well do the sleep on the client side.

    It makes sense to poll at an interval so that you don’t put too much load on the underlying resource being queried.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a previous question, I asked about various ORM libraries. It turns out Kohana
I asked a previous question about mapping an enumerated value on a table using
Okay so this is another question about a previous question I asked: Rookie SQL
I asked a question about this previously but my database structure has changed, and
Unit testing Abstract classes in Groovy I asked a question previous about unit testing
In a previous question I asked about how to group XML elements logically, and
In my previous question I asked about storing the result of a query in
So in a previous question I asked about implementing a generic interface with a
In a previous question I asked about weaknesses in my own security layer concept...
I asked about pipes in a previous question, got that working perfectly. However I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.