search
HomeWeb Front-endHTML TutorialHTTP header_html/css_WEB-ITnose

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
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
Springboot怎么使用内置tomcat禁止不安全HTTPSpringboot怎么使用内置tomcat禁止不安全HTTPMay 12, 2023 am 11:49 AM

Springboot内置tomcat禁止不安全HTTP方法1、在tomcat的web.xml中可以配置如下内容让tomcat禁止不安全的HTTP方法/*PUTDELETEHEADOPTIONSTRACEBASIC2、Springboot使用内置tomcat没有web.xml配置文件,可以通过以下配置进行,简单来说就是要注入到Spring容器中@ConfigurationpublicclassTomcatConfig{@BeanpublicEmbeddedServletContainerFacto

JAVA发送HTTP请求的方式有哪些JAVA发送HTTP请求的方式有哪些Apr 15, 2023 am 09:04 AM

1.HttpURLConnection使用JDK原生提供的net,无需其他jar包,代码如下:importcom.alibaba.fastjson.JSON;importjava.io.BufferedReader;importjava.io.InputStream;importjava.io.InputStreamReader;importjava.io.OutputStream;importjava.net.HttpURLConnection;

SpringBoot怎么通过Feign调用传递Header中参数SpringBoot怎么通过Feign调用传递Header中参数May 16, 2023 pm 08:38 PM

【SpringBoot】通过Feign调用传递Header中参数如何通过Feign传递Header参数问题描述我们在SpringCloud中使用Feign请求另一个服务的Api接口时,有将Header中参数传递下去的需求,如果不做特殊处理,就会将Header中的参数丢失。解决方案方案一:通过@RequestHeader(name="headerName")来传递例如:Feign定义如下@FeignClient(name="service-name")pub

linux的header是什么意思linux的header是什么意思Jul 18, 2023 pm 03:34 PM

linux的header是指在文件或数据流中的开头部分,用于包含关于内容的元数据,通过正确地编写和使用Header文件,开发者能够更好地利用系统资源,提高代码的可读性和可维护性。

nginx中如何升级到支持HTTP2.0nginx中如何升级到支持HTTP2.0May 24, 2023 pm 10:58 PM

一、前言#ssl写在443端口后面。这样http和https的链接都可以用listen443sslhttp2default_server;server_namechat.chengxinsong.cn;#hsts的合理使用,max-age表明hsts在浏览器中的缓存时间,includesubdomainscam参数指定应该在所有子域上启用hsts,preload参数表示预加载,通过strict-transport-security:max-age=0将缓存设置为0可以撤销hstsadd_head

Nginx中HTTP的keepalive怎么配置Nginx中HTTP的keepalive怎么配置May 12, 2023 am 11:28 AM

httpkeepalive在http早期,每个http请求都要求打开一个tpcsocket连接,并且使用一次之后就断开这个tcp连接。使用keep-alive可以改善这种状态,即在一次tcp连接中可以持续发送多份数据而不会断开连接。通过使用keep-alive机制,可以减少tcp连接建立次数,也意味着可以减少time_wait状态连接,以此提高性能和提高httpd服务器的吞吐率(更少的tcp连接意味着更少的系统内核调用,socket的accept()和close()调用)。但是,keep-ali

Python的HTTP客户端模块urllib与urllib3怎么使用Python的HTTP客户端模块urllib与urllib3怎么使用May 20, 2023 pm 07:58 PM

一、urllib概述:urllib是Python中请求url连接的官方标准库,就是你安装了python,这个库就已经可以直接使用了,基本上涵盖了基础的网络请求功能。在Python2中主要为urllib和urllib2,在Python3中整合成了urllib。Python3.x中将urllib2合并到了urllib,之后此包分成了以下四个模块:urllib.request:它是最基本的http请求模块,用来模拟发送请求urllib.error:异常处理模块,如果出现错误可以捕获这些异常urllib

如何使用PHP header()方法来调整网页如何使用PHP header()方法来调整网页Mar 28, 2023 pm 01:54 PM

PHP是一种功能强大的编程语言,可以用来创建动态网站和Web应用程序。其中一个最强大的功能之一是PHP的header()方法。在本文中,我们将探讨如何使用PHP的header()方法来调整网页。

See all articles

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

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft