Before I shared this article, I already shared common HTTP Header Fields, but this article is just a rough overview of the 47 header fields that are commonly used (not too much 😁), of course in order to get a good understanding of header fields, I put this 47 first is divided into four parts, the general first field – one of the four big first field in the request header fields, rounding – one of the four big first field of the entity’s first field explanation – one of the four big first field (there is no written will update) the response to the first field – one of the four big first word “, as an explanation, can let us better understand. After reading these articles, the first field mentioned in the interview, we are no longer afraid.

Today let’s see, “one of the four big first field -” response to the first field, some young man according to the literal meaning, have known its usage scenarios, for each return request of the first field, commonly used in response to the first field is divided into nine, come, let’s take a look at less than 19 common request field many 😑.

1, the Accept – Ranges

The value of bytes is used to inform the client of the range of requests that the server can accept. This response field is usually found only in the response field of a “range request”



2, the Location,

This field is interesting. When the Location is displayed, the response body is usually “301, 302, 303, 307″ (” the difference between the 3xx status code “). The response field for the redirection of the request contains a Location: “www.xxx”, which tells the client to redirect the request



3, the ETag

ETag is a string that is randomly generated by the server to identify the unique server resources. It appears to prove whether the server resources have been modified. The value of if-ranges is compared with the value of if-match, and If the values are inconsistent, the status code 412 is returned. If so, if-ranges’ response will return status code 206 and if-match will return status code 200. Isn’t that interesting

4, XXX to Authenticate

When you see this field, you might think of the Request field Authrozation field. Yes, this is the request authentication that the server wants to authenticate the Web user. For a simple example, when a client requests the server, the server has some resources for certain users, and it will respond to the client with the status code 401. Then carry a response field – Authenticate: XXX ‘basic | digest’ way of certification (the “basic authentication” digest authentication)

5, the Proxy – Authenticate

This field has the same meaning as xxx-Authenticate except that it is used between the client and the proxy server

6, Server

This is used to describe the version and model of the server



7, than

Now, this field is also very interesting, because it’s in the opposite cache, so how do you target it? For proxy server and resource server communication, for example, the response now carries the field Vary: Accept-language, so any request with accept-language in the request field will be automatically cached



8, the Age

The literal meaning is age, but the literal meaning in the response field is also time, which tells the client when the server created the response, in seconds. When the proxy is a cache server, the response must carry this field, which indicates the time between the cached response and the authentication completion.



9, Retry After

This field is also very interesting. It is usually accompanied by status codes: ‘3xx, 503’ (interview FREQUENTLY asked Response Code 3xx, Interview Frequently asked Response Code 4xx, Introduction 1xx, 2XX, 5xx), which means that the server is busy now, you can come back later.