Use of the PHP header function
The cache of the Web page is controlled by the "Cache-control" in the HTTP message header, and the common values are private, No-cache, Max-age, must-revalidate, etc., and the default is private. Its function is
After the WML page is downloaded to the WAP device, it will be stored in the WAP device memory for a period of time until this time expires. After that, the page will be downloaded from the server, rather than from the cache of the WAP device. when
The Phpheader () function syntax and usage code are described in detail. common status codes of headers are listed here.
Syntax:
The code is as follows:
Void header (string $ string [, bool $ replace = true [, int $ http_response_code)
Send the
Use PHP to manually make webpages expire. detrox [translation]Keyword webpage expired, registration webpage writingSource http://www.phpbuilder.net/columns/clark20030702.php3 Manually Expiring Web PagesManual webpage expiration
By Joe
This article provides a detailed analysis of HTTP message header webpage Cache Control and common header commands. For more information, see
This article provides a detailed analysis of HTTP message header webpage Cache Control and common header
InHeader ("Cache-control: private"); the webpage Cache is controlled by the PHP Cache controller in the HTTP message header, common values include private, no-cache, max-age, and must-revalidate. The default value is private. The function of browser
The cache of the Web page is controlled by the "Cache-control" in the HTTP message header, and the common values are private, No-cache, Max-age, must-revalidate, etc., and the default is private.
Its function is divided into the following
HTML config no-cache (memo)No-cache ConfigurationThe HTML table header is as follows
Meta http-equiv= "content-type" content= "text/html; Charset=utf-8 " />
Meta http-equiv= "pragma" content="No-cache">
Meta
Grammar:
Copy Code code as follows:
Void Header (String $string [, bool $replace =true [, int $http _response_code)
Send the original HTTP header to the client
Need to note:
The header function must be invoked before any actual
[Php]Function downloadFile ($ fullPath ){ // Must be fresh startIf (headers_sent () // check if any header has been sentDie ('headers sent'); // Equivalent to exit () // Required for some browsersIf (ini_get ('zlib. output_compression ') // Gets the
The Phpheader () function syntax and usage code are described in detail. common status codes of headers are listed here.
Syntax:
The code is as follows:
Void header (string $ string [, bool $ replace = true [, int $ http_response_code)
Send the
Phpheader () function syntax and code. Syntax: Copy the code as follows: Voidheader (string $ string [, bool $ replacetrue [, int $ http_response_code) to send the original HTTP Header to the client. note: The Header function must be in
Syntax:
The
The Phpheader () function syntax and usage code are described in detail. Common status codes of headers are listed here.
The Php header () function syntax and usage code are described in detail. Common status codes of headers are listed here.
This article provides a detailed analysis of HTTP message header webpage cache control and common header commands, for more information, see "Cache-control" in the HTTP message header, common values include private, no-cache, max-age, and
Php forms are submitted and then rolled back. The content of the form is cleared by default (when session_start is used). The solution is after session_start, write the header (Cache-control: private) before the character output. The php form is
PHP back one page
With onclick= "History.go (-1);" or onclick= "history";
PHP forms are backed up after submission, and the contents of the form are emptied by default (when using Session_Start).
The workaround is after Session_Start (), the
Use onclick = "history. go (-1); "or onclick =" history (back) "; php form after submission and then back, the content of the form is cleared by default (when session_start is used ), solution: after session_start (), write h php before the
The cache of the Web page is controlled by the "Cache-control" in the HTTP message header, and the common values are private, No-cache, Max-age, must-revalidate, etc., and the default is private. Its function is divided into the following situations
The cache of the Web page is controlled by the "Cache-control" in the HTTP message header, and the common values are private, No-cache, Max-age, must-revalidate, etc., and the default is private. Its function is divided into the following situations
Php returns a page with onclickhistory. go (-1); or onclickhistory (back); php form after submission and then back, the form content is cleared by default (when session_start is used ), the solution is to write the header ("Cache-control: private")
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.