This article systematically describes HTTP headers in a concise and easy-to-understand manner.What is HTTP headers?
HTTP is written by "Hypertext Transfer Protocol". This protocol is used throughout the world wide web. Most of the content you see in
HTTP header OverviewHypertexttransferprotocol is short for Hypertext Transfer Protocol. It is used to transmit WWW Data. For details about HTTP, see rfc2616.The HTTP protocol uses the request/response model.The client sends a request to the server.
The PHP version of the website cache to speed up the opening of the way to share, the need for friends can refer to the following instructions:
1. the compressed files are cached on the server, and the re-access reduces the re-compression time to
Header()is used to send raw HTTPHeaders. See the http/1.1 specification for more information on HTTPHeaders.
Example One:
Copy CodeThe code is as follows:
Header ("location:http://www.jb51.net";);
exit;//must add "exit" after each redirect to
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 header () function sends the original HTTP header to the client.
Copy CodeThe code is as follows:
200 normal state
Header (' http/1.1 OK ');
301 permanent Redirect, remember to add a redirect address at the back location: $url
Header (' http/1.
Copy CodeThe code is as follows:
Fix 404 Pages:
Header (' http/1.1 OK ');
Set 404 Header:
Header (' http/1.1 404 Not Found ');
Set Moved permanently header (Good for redrictions)
Use with location header
Header (' http/1.1 301 Moved permanently ');
Technical information about http headers in http
I. BasicsHyperTextTransferProtocol is short for Hypertext Transfer Protocol. It is used to transmit WWW Data. For details about HTTP, see rfc2616. The HTTP protocol uses the request/response model.
The HTTP protocol is based on the request response mode. The client sends a request to the server. The request header contains the request method, URI, Protocol version, and request modifier,
Message results of MIME-like client information and
Log File Location
By default, IIS 7.0 puts log files in the following folders: Inetpub \ logs \ logfiles
This folder contains different directories for each web site. By default, log files are created daily in the directory and named by date. For
If an IIIs error occurs, first check the error code to find out what the error is and solve the problem accordingly, which will reduce the time.
Http1xx-the status code prompts a temporary response. Before receiving a regular response, the client
1. Cache
The corresponding engineers are too familiar with caching, which is too convenient. the way resources or data are obtained is omitted, and the cache is directly the fastest place for user access, which also reduces the pressure on the
Note:
1. the compressed files are cached on the server, and the re-access reduces the re-compression time to reduce the CPU usage.
2. You can set the Client File Cache Time to reduce the number of re-requests by more than 85%.
3. Because the image
The PHP version of the website cache to speed up the opening of the way to share, the need for friends can refer to the following instructions:
1. the compressed files are cached on the server, and the re-access reduces the re-compression time to
This is a creation in
Article, where the information may have evolved or changed. This article by Bole Online-bruce-accumulate translation. without permission, no reprint!
English Source: Vinay Sahni. Welcome to join the translation team.
Background
Php enables gzip compression to accelerate the website
Note:After the compressed files are cached on the server, the re-access will reduce the re-compression time and reduce the CPU usage. By setting the client file cache time, you can
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.