Problems with comet-php program blocking

Source: Internet
Author: User


In doing a comet function, the second request is a request to get information, the program has been blocked
Code:

Then the third request is a request that triggers a condition in HTML and then initiates

What is the reason that the third request will not be executed until the execution of the second request is completed?

In doing PHP comet function encountered this problem a good pit dad ....

What's the problem?

Reply content:


In doing a comet function, the second request is a request to get information, the program has been blocked
Code:

Then the third request is a request that triggers a condition in HTML and then initiates

What is the reason that the third request will not be executed until the execution of the second request is completed?

In doing PHP comet function encountered this problem a good pit dad ....

What's the problem?

Take a look at the timeline, the third request should be a wait-out state (Blocking), and the second request is completed before it is issued from the browser

This is generally because the previous request returned connection:keep-alive, but the response was not completed
Subsequent homologous requests will wait until the TCP link is released by the previous request and becomes available

http://leeon.me/a/persistent-link-poll-ajax-requests-with-php
Self-answer ... Come across this question and see this article

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.