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 7828381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:20:10+00:00 2026-06-02T10:20:10+00:00

I have some information about Comet, but I want to know how it keeps

  • 0

I have some information about Comet, but I want to know how it keeps a connection open (from client to server).
how does it do that?

  • 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-06-02T10:20:11+00:00Added an answer on June 2, 2026 at 10:20 am

    Comet, or long-polling ajax, doesn’t keep a connection open in the long run.

    HTTP is stateless, it sends a request and gets the response. That’s it.

    So, how does it look like the connection remains open? Because it’s abusing an HTTP request.

    When you send the request, the client waits for the response until it’s coming, or until the server decides that this connection has reached its timeout.

    In Comet, the server purposedly doesn’t answer immediately. It only answers when he wants to send a response. This is why the client sends HTTP requests and waits for either a response or the timeout.

    This way, it looks like some kind of push from server to client, when it’s just abusing the timeout property of the HTTP requests.

    For example, this is some comet code (with jQuery for the sake of keeping it short):

    setTimeout( function comet () {
        $.get( '/some/url', {}, function ( data ) {
            // Process the request's response
    
            // And recall setTimeout
            setTimeout( comet, 1 )
        } )
    }, 1 )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to develop an application that display some information about the possessor of
I have this small class called City that simply holds some information about a
I have a simple class that contains some general information about the current web
I have seen that typing about:somekeywords in browsers address bar gives some information. What
I have several gen_server workers periodically requesting some information from hardware sensors. Sensors may
Does anyone have some good information on the usage of the .SaveChanges() method? I
I have a Django model and I want to show some statistics about it.
I'm about to have to rewrite some rather old code using SQL Server's BULK
I have a 1.3GB text file that I need to extract some information from
I have some information in my database like 'author', 'book' etc., that are all

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.