Specific meaning of parameters in HTTP request header

Time:2020-9-17

As a front-end development, it is necessary to understand that browsers send HTTP requests.

7 steps of HTTP request

1. Establish TCP link

2. The browser sends a request (get / sample)/ hello.jsp HTTP/1.1)

3. Request header sent by browser

4. Server sends response (HTTP / 1.1200 OK)

5. The server sends the response header

6. The server sends data

7. The server closes the TCP connection

In the browser, what does the request information of network and the header mean

General section:

Request URL: the request URL of the resource

Request method: http method

Status code: response status code

200 (status code) ok (Reason Phrase)

301 – resources (web pages, etc.) are permanently transferred to other URLs

404 – the requested resource (web page, etc.) does not exist

500 – internal server error

Response Headers:

Content- Encoding:gzip ——Compression encoding type

Content- Type:text/html ——The type of server sending and the encoding method adopted

Date:Tue , 14 Feb 2017 03:38:28 GMT — time when the client requests the server

Last- Modified:Fri , 10 Feb 2017 09:46:23 GMT — the time when the server last modified the resource. GMT is Greenwich mean time

Server:nginx/1.2.4 ——The web server name of the server

Transfer- Encoding:chunked ——Block transfer data to client

Request Headers:

Accept:text/html ——The type of resource the client can receive

Accept- Encoding:gzip , deflate — the type of compressed data the client can receive

Accept- Language:en-US , en; q = 0.8 — the language type received by the client

Cache- Control:no-cache ——The server forbids the client to cache page data

C onnection:keep-alive ——Maintain the connection between client and server

Cookie: – the client temporarily stores the information of the server

Host:www.jnshu.com ——The target host and port number of the connection

Pragma:no-cache ——The server forbids the client to cache page data

Referer:http / / www.jnshu.com/daily/15052 ——Where did it come from

User agent: the name of the client version number

Specific meaning of parameters in HTTP request header

Photo taken from: https://blog.csdn.net/xiaochengyihe/article/details/80910913

Recommended Today

JS function

1. Ordinary function Grammar: Function function name (){ Statement block } 2. Functions with parameters Grammar: Function function name (parameter list){ Statement block } 3. Function with return value Grammar: Function function name (parameter list){ Statement block; Return value; } Allow a variable to accept the return value after calling the function Var variable name […]