The caching of the Web page is controlled by the "Cache-control" in the HTTP message header, the common value has private, No-cache, Max-age, must-revalidate, etc., the default is private. Its role is divided into the following situations according
PHP headers used in the HTTP protocol and common methods Summary, header summary
This paper summarizes the HTTP protocol used by headers in PHP and the common methods. Share to everyone for your reference. Here's how:
Copy CodeThe code is as
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
This article is the HTTP Header page cache control and header commonly used instructions for a detailed analysis of the introduction, the need for friends to reference the
The caching of the Web page is controlled by the "Cache-control" in the
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
HTTP request Headers OverviewHTTP client programs, such as browsers, must indicate the type of request (usually get or post) when sending a request to the server. If necessary, the client program can also choose to send additional request headers.
The PHP header function sets an example of an HTTP message header,
Define the encoding header (' Content-type:text/html;charset=utf-8 ');Atomheader (' Content-type:application/atom+xml ');Cssheader (' Content-type:text/css ');Javascriptheader ('
PHP uses the header function to set the HTTP header to parse the header. Copy the code as follows: define the encoding header (Content-Type: texthtml; charsetutf-8); Atomheader (Content-type: applicationatom + xml); CSSheader (Conten as follows:
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
/**
Desc:header functions to set various HTTP headers
link:bbs.it-home.org
Date:2013/2/24
*/
Defining the Encoding
Header (' Content-type:text/html;charset=utf-8 ');
Atom
Header ('
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.