AJAX - The Complete Reference

(avery) #1

594 Part IV: Appendixes


Request Header Description Examples
Accept-Language Lists the languages preferred by
the browser and can be used by the
server to pass back the appropriate
language data. Similar to the
other Accept related headers “q”
parameters are allowed with this
header.

Accept-Language: en-
us,en;q=0.5

Authorization Typically used to indicate the
authorization type and encoded
user id : password if the user is
returning authorization information.
Note that there is nothing to prevent
decoding such values unless this
transmission is encrypted as with
SSL connections.

Authorization: Basic QWxhZGRp
bjpvcGVuIHNlc2FtZQ==

Cookie Passes any set cookie(s) for the
resource server or domain being
requested. Note: This header is not
part of the HTTP 1.1 specification,
but it is so commonly sent it is
included here.

Cookie: PREF
ID=d771c1ef8465c3a5

Expect Indicates that particular server
behaviors are required. This is
found in a situation where a client
wants to wait for a server response
code 100, indicating the request
should continue before sending
request body.

Expect: 100-continue

From Should provide the e-mail address
of the person who controls the
user-agent making the request. This
header is in the specification but is
rarely if ever seen outside of some
bot requests because of privacy
implications.

From: [email protected]

Host Indicates the host and port of the
server to which the request is being
made. It is extremely important in a
server that is running many domain
names at once as virtual servers.
A trailing port number can be used
as well, separated by a colon;
otherwise, the default value of 80
for HTTP requests is used.

Host: ajaxref.com

TABLE B-5 HTTP 1.1 Request Headers (continued)
Free download pdf