Useful HTTP Headers
In this lesson we will look at the meanings of some useful headings.
Host Header
The Host header contains the name of the domain to which the request is made:
Host: example.com
Together with the start line containing the URI and the Host header containing the domain name, the result is the URL of the requested page:
GET /test/ HTTP/1.1
Host: example.com
Date Heading
The Date header contains the time at which the HTTP message was created:
Date: Wed, 21 Oct 2020 07:28:00 GMT
Last-Modified header
The Last-Modified header in an HTTP response contains the date and time at which the server believes the requested resource was modified. It is used as a check to determine whether the resource has remained unchanged. Example:
Last-Modified: Sat, 16 Jan 2020 21:16:42 GMT
Content-Type Header
The Content-Type header specifies the type of content returned and its encoding:
Content-Type: text/html; charset=utf-8
Content-Language Header
The Content-Language header specifies the language in which the returned document is written:
Content-Language: ru
Content-Length Header
The Content-Length header specifies the size of the object body sent to the recipient in bytes:
Content-Length: 10000