Table of Contents
Requests section
Responses part
Home Web Front-end HTML Tutorial HTTP header_html/css_WEB-ITnose

HTTP header_html/css_WEB-ITnose

Jun 24, 2016 pm 12:02 PM
header http

HTTP (HyperTextTransferProtocol) is the Hypertext Transfer Protocol, which is currently the common protocol for web page transmission. The HTTP protocol adopts a request/response model. The browser or other client issues a request and the server responds. As far as the entire network resource transmission is concerned, it includes message-header and message-body. First pass message- header, that is, http headerMessage. http header messages are usually divided into 4 parts: general header, request header, response header, entity header. However, in terms of understanding, the boundaries of this division are not very clear. According to the organization form of http header content in Wikipedia, it is roughly divided into two parts: Request and Response.

Requests section

Header explanation example

Responses part

Accept Specify the content type that the client can receive Accept: text /plain, text/html
Accept-Charset The character encoding set that the browser can accept. Accept-Charset: iso-8859-5
Accept-Encoding Specifies the content compression encoding type returned by the web server that the browser can support. Accept-Encoding: compress, gzip
Accept-Language Browser-accepted language Accept-Language: en,zh
Accept-Ranges You can request one or more sub-range fields of the web page entity Accept-Ranges: bytes
Authorization Authorization certificate for HTTP authorization Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Cache-Control Specify the caching mechanism followed by requests and responses Cache-Control: no-cache
Connection Indicates whether a persistent connection is required. (HTTP 1.1 uses persistent connections by default) Connection: close
Cookie When an HTTP request is sent, the cookie stored under the request domain name will be All cookie values ​​are sent together to the web server. Cookie: $Version=1; Skin=new;
Content-Length Requested content length Content- Length: 348
Content-Type The requested MIME information corresponding to the entity Content-Type: application/x-www-form- urlencoded
Date The date and time the request was sent Date: Tue, 15 Nov 2010 08:12:31 GMT
Expect Requested specific server behavior Expect: 100-continue
From Email of the user who made the request From: user@email.com
Host Specify the domain name and port number of the requested server Host: www.zcmhi.com
If-Match Only valid if the request content matches the entity If-Match: "737060cd8c284d8af7ad3082f209582d"
If-Modified-Since If the requested part is modified after the specified time, the request is successful. If it is not modified, a 304 code is returned If-Modified-Since: Sat, 29 Oct 2010 19:43:31 GMT
If-None-Match If the content has not changed, return 304 code , the parameter is the Etag previously sent by the server, and is compared with the Etag responded by the server to determine whether it has changed If-None-Match: "737060cd8c284d8af7ad3082f209582d"
If-Range If the entity has not changed, the server sends the missing part from the client, otherwise the entire entity is sent.Parameters are also Etag If-Range: "737060cd8c284d8af7ad3082f209582d"
If-Unmodified-Since Only if the entity has not been modified after the specified time The request is successful If-Unmodified-Since: Sat, 29 Oct 2010 19:43:31 GMT
Max-Forwards Restrict information from passing Time spent by proxies and gateways Max-Forwards: 10 : no-cache
Proxy-Authorization Authorization certificate to connect to the proxy Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Range Only request a part of the entity, specify the range Range: bytes=500-999
Referer The address of the previous web page, followed by the current requested web page, that is, the source Referer: http://www.zcmhi.com/archives/71.html
TE The transfer encoding that the client is willing to accept, and notifies the server to accept the tail plus header information TE: trailers,deflate;q=0.5
Upgrade Specify a transport protocol to the server for conversion (if supported) Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/ x11
User-Agent The content of User-Agent contains the user information that made the request User-Agent: Mozilla/5.0 (Linux; X11 )
Via Notify the intermediate gateway or proxy server address, communication protocol Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Warning Warning information about the message entity Warn: 199 Miscellaneous warning
Header explanation example
Accept-Ranges Indicates whether the server supports specified range requests and what type of segmented requests Accept-Ranges: bytes
Age Estimated time in seconds from origin to proxy cache formation Age: 12
Allow A valid request behavior for a certain network resource. If it is not allowed, 405 will be returned Allow: GET , HEAD
Cache-Control Tell all caching mechanisms whether they can be cached and what type Cache-Control: no-cache
Content-Encoding The returned content compression encoding type supported by the web server. Content-Encoding: gzip
Content-Language Language of the response body Content-Language: en,zh
Content-Length The length of the response body Content-Length: 348
Content-Location Request an alternate address for the resource Content-Location: /index.htm
Content-MD5 Return the MD5 check value of the resource Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ==
Content-Range In this part of the entire return body Byte position Content-Range: bytes 21010-47021/47022
Content-Type Return the MIME type of the content Content-Type: text/html; charset=utf-8
Date The time when the original server message was sent Date: Tue, 15 Nov 2010 08:12:31 GMT
ETag The current value of the entity tag of the request variable ETag: "737060cd8c284d8af7ad3082f209582d"
Expires The date and time the response expires Expires: Thu, 01 Dec 2010 16:00:00 GMT
Last-Modified The last modified time of the requested resource Last-Modified: Tue, 15 Nov 2010 12:45:26 GMT
Location is used to redirect the recipient to the location of the non-requested URL to complete the request or identify a new resource Location: http://www.zcmhi.com/archives/94.html
Pragma Contains implementation-specific instructions that can be applied to any receiver in the response chain Pragma: no-cache
Proxy-Authenticate It indicates the authentication scheme and parameters on that URL that can be applied to the proxy Proxy-Authenticate: Basic
refresh Apply to redirect or a new resource is created, redirect after 5 seconds (proposed by Netscape, supported by most browsers)

Refresh: 5; url=

http://www.zcmhi.com/archives/94.html

Retry-After If the entity is temporarily unavailable, notify the client to try again after the specified time Retry-After: 120
Server web server software name Server: Apache/1.3.27 (Unix) (Red-Hat/Linux)
Set-Cookie Set Http Cookie Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1
Trailer Indicates that the header field exists at the end of the chunked transfer encoding Trailer: Max-Forwards
Transfer-Encoding File Transfer-Encoding Transfer-Encoding:chunked
Vary Tells the downstream proxy whether to use a cached response or request from the origin server Vary: *
Via Informs the proxy where the client response was sent Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Warning Warning entity about possible problems Warning: 199 Miscellaneous warning
WWW-Authenticate Indicates the authorization scheme that the client requesting entity should use WWW-Authenticate: Basic
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What does http status code 520 mean? What does http status code 520 mean? Oct 13, 2023 pm 03:11 PM

HTTP status code 520 means that the server encountered an unknown error while processing the request and cannot provide more specific information. Used to indicate that an unknown error occurred when the server was processing the request, which may be caused by server configuration problems, network problems, or other unknown reasons. This is usually caused by server configuration issues, network issues, server overload, or coding errors. If you encounter a status code 520 error, it is best to contact the website administrator or technical support team for more information and assistance.

What does linux header mean? What does linux header mean? Jul 18, 2023 pm 03:34 PM

The Linux header refers to the beginning of a file or data stream, which is used to contain metadata about the content. By correctly writing and using Header files, developers can better utilize system resources and improve code readability and Maintainability.

Understand common application scenarios of web page redirection and understand the HTTP 301 status code Understand common application scenarios of web page redirection and understand the HTTP 301 status code Feb 18, 2024 pm 08:41 PM

Understand the meaning of HTTP 301 status code: common application scenarios of web page redirection. With the rapid development of the Internet, people's requirements for web page interaction are becoming higher and higher. In the field of web design, web page redirection is a common and important technology, implemented through the HTTP 301 status code. This article will explore the meaning of HTTP 301 status code and common application scenarios in web page redirection. HTTP301 status code refers to permanent redirect (PermanentRedirect). When the server receives the client's

How to use Nginx Proxy Manager to implement automatic jump from HTTP to HTTPS How to use Nginx Proxy Manager to implement automatic jump from HTTP to HTTPS Sep 26, 2023 am 11:19 AM

How to use NginxProxyManager to implement automatic jump from HTTP to HTTPS. With the development of the Internet, more and more websites are beginning to use the HTTPS protocol to encrypt data transmission to improve data security and user privacy protection. Since the HTTPS protocol requires the support of an SSL certificate, certain technical support is required when deploying the HTTPS protocol. Nginx is a powerful and commonly used HTTP server and reverse proxy server, and NginxProxy

What is http status code 403? What is http status code 403? Oct 07, 2023 pm 02:04 PM

HTTP status code 403 means that the server rejected the client's request. The solution to http status code 403 is: 1. Check the authentication credentials. If the server requires authentication, ensure that the correct credentials are provided; 2. Check the IP address restrictions. If the server has restricted the IP address, ensure that the client's IP address is restricted. Whitelisted or not blacklisted; 3. Check the file permission settings. If the 403 status code is related to the permission settings of the file or directory, ensure that the client has sufficient permissions to access these files or directories, etc.

Quick Application: Practical Development Case Analysis of PHP Asynchronous HTTP Download of Multiple Files Quick Application: Practical Development Case Analysis of PHP Asynchronous HTTP Download of Multiple Files Sep 12, 2023 pm 01:15 PM

Quick Application: Practical Development Case Analysis of PHP Asynchronous HTTP Download of Multiple Files With the development of the Internet, the file download function has become one of the basic needs of many websites and applications. For scenarios where multiple files need to be downloaded at the same time, the traditional synchronous download method is often inefficient and time-consuming. For this reason, using PHP to download multiple files asynchronously over HTTP has become an increasingly common solution. This article will analyze in detail how to use PHP asynchronous HTTP through an actual development case.

http request 415 error solution http request 415 error solution Nov 14, 2023 am 10:49 AM

Solution: 1. Check the Content-Type in the request header; 2. Check the data format in the request body; 3. Use the appropriate encoding format; 4. Use the appropriate request method; 5. Check the server-side support.

Common network communication and security problems and solutions in C# Common network communication and security problems and solutions in C# Oct 09, 2023 pm 09:21 PM

Common network communication and security problems and solutions in C# In today's Internet era, network communication has become an indispensable part of software development. In C#, we usually encounter some network communication problems, such as data transmission security, network connection stability, etc. This article will discuss in detail common network communication and security issues in C# and provide corresponding solutions and code examples. 1. Network communication problems Network connection interruption: During the network communication process, the network connection may be interrupted, which may cause

See all articles