HTTP Headers - Part 4 of Chapter 3 from HTTP: The Definitive Guide (2/6) | WebReference

HTTP Headers - Part 4 of Chapter 3 from HTTP: The Definitive Guide (2/6)

To page 1current pageTo page 3To page 4To page 5To page 6
[previous] [next]

HTTP: The Definitive Guide, Chapter 3: HTTP Messages

General Headers

Some headers provide very basic information about a message. These headers are called general headers. They are the fence straddlers, supplying useful information about a message regardless of its type.

For example, whether you are constructing a request message or a response message, the date and time the message is created means the same thing, so the header that provides this kind of information is general to both types of messages. Table 3-11 lists the general informational headers.

Table 3-11: General informational headers

Header

Description

Connection

Allows clients and servers to specify options about the request/response connection

Date[4]

Provides a date and time stamp telling when the message was created

MIME-Version

Gives the version of MIME that the sender is using

Trailer

Lists the set of headers that are in the trailer of a message encoded with the chunked transfer encoding[5]

Transfer-Encoding

Tells the receiver what encoding was performed on the message in order for it to be transported safely

Upgrade

Gives a new version or protocol that the sender would like to "upgrade" to using

Via

Shows what intermediaries (proxies, gateways) the message has gone through

General caching headers

HTTP/1.0 introduced the first headers that allowed HTTP applications to cache local copies of objects instead of always fetching them directly from the origin server. The latest version of HTTP has a very rich set of cache parameters. In Chapter 7, we cover caching in depth. Table 3-12 lists the basic caching headers.

Table 3-12: General caching headers

Header

Description

Cache-Control

Used to pass caching directions along with the message

Pragma[6]

Another way to pass directions along with the message, though not specific to caching


4. Appendix C lists the acceptable date formats for the Date header. Back

5. Chunked transfer codings are discussed further in "Chunking and persistent connections" in Chapter 15. Back

6. Pragma technically is a request header. It was never specified for use in responses. Because of its common misuse as a response header, many clients and proxies will interpret Pragma as a response header, but the precise semantics are not well defined. In any case, Pragma is deprecated in favor of Cache-Control. Back


To page 1current pageTo page 3To page 4To page 5To page 6
[previous] [next]

Created: February 5, 2003
Revised: February 5, 2003

URL: https://webreference.com/programming/http/chap3/4/2.html