---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");