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

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

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

HTTP: The Definitive Guide, Chapter 3: HTTP Messages

Request Headers

Request headers are headers that make sense only in a request message. They give information about who or what is sending the request, where the request originated, or what the preferences and capabilities of the client are. Servers can use the information the request headers give them about the client to try to give the client a better response. Table 3-13 lists the request informational headers.

Table 3-13: Request informational headers

Header

Description

Client-IP[7]

Provides the IP address of the machine on which the client is running

From

Provides the email address of the client's user[8]

Host

Gives the hostname and port of the server to which the request is being sent

Referer

Provides the URL of the document that contains the current request URI

UA-Color

Provides information about the color capabilities of the client machine's display

UA-CPU[9]

Gives the type or manufacturer of the client's CPU

UA-Disp

Provides information about the client's display (screen) capabilities

UA-OS

Gives the name and version of operating system running on the client machine

UA-Pixels

Provides pixel information about the client machine's display

User-Agent

Tells the server the name of the application making the request

Accept headers

Accept headers give the client a way to tell servers their preferences and capabilities: what they want, what they can use, and, most importantly, what they don't want. Servers can then use this extra information to make more intelligent decisions about what to send. Accept headers benefit both sides of the connection. Clients get what they want, and servers don't waste their time and bandwidth sending something the client can't use. Table 3-14 lists the various accept headers.

Table 3-14: Accept headers

Header

Description

Accept

Tells the server what media types are okay to send

Accept-Charset

Tells the server what charsets are okay to send

Accept-Encoding

Tells the server what encodings are okay to send

Accept-Language

Tells the server what languages are okay to send

TE[10]

Tells the server what extension transfer codings are okay to use


7. Client-IP and the UA-* headers are not defined in RFC 2616 but are implemented by many HTTP client applications. Back

8. An RFC 822 email address format. Back

9. While implemented by some clients, the UA-* headers can be considered harmful. Content, specifically HTML, should not be targeted at specific client configurations. Back

10. See "Transfer-Encoding Headers" in Chapter 15 for more on the TE header. Back


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

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

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