Easy! IT | WEB | HTTP header field
This article is a rough explanation of the HTTP header field.
Everything might be not exactly correct in this article but it’s very useful for beginners to understand IT terms. If you want to learn IT but you don’t have any experience to work in the IT industry, I wish it helps you to understand IT. And I hope this article makes you study IT more.
Let’s start our 3 minutes lesson!
What is the HTTP header field?
- HTTP header fields are in the request message and the response message.
- Necessary information to transmit data between a client and a server is written in HTTP header fields.
If you don’t know the basic web technology, I suggest you read the following articles before you read this article.
Easy! IT | WEB | World Wide Web | Japan Teams
Easy! IT | WEB | HyperText Transfer Protocol | Japan Teams
Easy! IT | WEB | HTTP Authentication | Japan Teams
Easy! IT | WEB | Basic access authentication | Japan Teams
1. Summary of HTTP request and response
HTTP is the transport protocol. Clients(users) request content from their web browsers and the web servers respond to their requests.
Summary of HTTP
Firstly I explain typical HTTP network traffic between HTTP clients and HTTP servers.
1. HTTP request
When a user wants to check the webpage, he uses a web browser (a client). He sends requests via a client.
2. HTTP response
Then after few steps(such as HTTP authentication), the WEB server gives the user the content that the user wants if the server accepts the request.
The client and the WEB server exchange the data with a HyperText file at that moment. The HTTP header field is part of the file.
2. Explanation of HTTP header field
The summary of header field
When a client sends request messages to the server, which consist of the following things.
- A request line
- Zero or more request header fields ★We are talking about this.
- An empty line, consisting of a carriage return and a line feed
HTTP header fields are a list of linefeed-separated HTTP data being sent and received by both the client program and server on every HTTP request.
HTTP header fields are each consisting of the case-insensitive field name, a colon, optional leading whitespace, the field value, and optional trailing whitespace, and ending with a carriage return and a line feed(※Carriage return – Wikipedia).
※ In the HTTP/1.1 protocol, all header fields except Host are optional.
Header fields define the following things.
- How information sent/received through the connection are encoded (as in Accept-Encoding)
- The session verification and identification of the client (as in browser cookies, IP address, user-agent)
- Their anonymity thereof (VPN or proxy masking, user-agent spoofing),
- How the server should handle data (as in Do-Not-Track)
- The age of the document being downloaded
- Amongst others
There are different values defined between request and response, each value is as follows.
The list of HTTP request header field(Client-Side)
- Accept
- Accept-Language
- Accept-Encoding
- Accept-Charset
- Authorization
- Cache-Control
- Cookie
- Content-Length
- Content-Type
- Date
- Expect
- Host
- If-Match
- If-Modified-Since
- If-none-Match
- If-Range
- If-Unmodified-Since
- Max-Forwards
- Proxy-Authorization
- Range
- Referer
- TE
- User-Agent
The list of HTTP Response header field(Server-Side)
- Accept-Range
- Age
- Allow
- Cache-Control
- Connection
- Content-Encoding
- Content-Language
- Content-Length
- Content-Location
- Content-Security-Policy
- Content-Type
- Date
- ETag
- Expires
- Last-Modified
- Location
- Proxy-Authenticate
- Retry-Agter
- Server
- Set-Cookie
- Transfer-Encoding
- Vary
- Via
If you need future information, please check the following pages or others.
Information source: List of HTTP header fields – Wikipedia, HTTP-Header – What does that mean? What are request and response headers? – IONOS, rfc7230 (ietf.org)
fin
|