Javascript-html Response Header return error problem, welcome to explore. Net::err_response_headers_too_big

Source: Internet
Author: User
---update---
Update the reason why the request header generates so much information;
So, I wrote Session_write_close () in a long loop (tens of thousands of times), and once per loop, the session lock was solved once, so that we could run other pages ~ But that would generate a bunch of session records in the header. Can this problem be solved? I'm also looking for PHP to clear the header records and so on ~ not found ~
--------------First edit-------------------------//
A very interesting mistake to make a Web request today ~
I made an AJAX request, but I failed, and then I went to see the console request herders. The error of the report is

Provisional headers are shown

The request timed out, and then I set up Ajax timeout:100000000, but I couldn't, but I saw the error in the console.

net::ERR_RESPONSE_HEADERS_TOO_BIG

Then search, this error is less information, and then Google to the question of the approximate
Error 325

It looks like Chrome (used with firephp4chrome) have the lowest limit for headers size according to StackOverflow of 256KB For all headers.

That is, the size limit returned by headers is 256kb, and then C + + has a method to set the maximum length of the response header, but no PHP is found.
Httpwebrequest.maximumresponseheaderslength Property

(⊙v⊙) Well ..... My question is to ask how to set the request header related functions in PHP, and if there is an HTTP header related knowledge or book information can also recommend AH ~

Reply content:

---update---
Update the reason why the request header generates so much information;
So, I wrote Session_write_close () in a long loop (tens of thousands of times), and once per loop, the session lock was solved once, so that we could run other pages ~ But that would generate a bunch of session records in the header. Can this problem be solved? I'm also looking for PHP to clear the header records and so on ~ not found ~
--------------First edit-------------------------//
A very interesting mistake to make a Web request today ~
I made an AJAX request, but I failed, and then I went to see the console request herders. The error of the report is

Provisional headers are shown

The request timed out, and then I set up Ajax timeout:100000000, but I couldn't, but I saw the error in the console.

net::ERR_RESPONSE_HEADERS_TOO_BIG

Then search, this error is less information, and then Google to the question of the approximate
Error 325

It looks like Chrome (used with firephp4chrome) have the lowest limit for headers size according to StackOverflow of 256KB For all headers.

That is, the size limit returned by headers is 256kb, and then C + + has a method to set the maximum length of the response header, but no PHP is found.
Httpwebrequest.maximumresponseheaderslength Property

(⊙v⊙) Well ..... My question is to ask how to set the request header related functions in PHP, and if there is an HTTP header related knowledge or book information can also recommend AH ~

Respond header too big this proves that your data misplaced the place Ah, generally speaking respond inside more is the URL, there are some chaotic data, up to a few KB so big. 256KB has been a lot. If you have a lot of data to return, you have to put it inside the body .

Let me add the method of setting HTTP header inside PHP:

header("Cache-Control: max-age=86400");header("Content-type: application/octet-stream");
  • 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.