AJAX - The Complete Reference

(avery) #1

PART IV


Appendix B: HTTP 1.1 Reference 595


Request Header Description Examples
If-Match Makes a request conditionally only
if the items match some selector
value passed in; typically related to
an encountered ETag header value.

If-Match: 4135cda4

If-Modified-
Since

Indicates file freshness to
determine if a response is
required. For example, when used
in conjunction with a GET request
for a particular file, the requested
file is checked to see if it has been
modified since the time specified
in the field. If the file has not been
modified, a "not modified" code
(304) is sent to the client so a
cached version of the document
can be used; otherwise, the file is
returned normally.

If-Modified-Since: Wed, 01
Sep 2004 13:24:52 GMT

If-None-Match Does the opposite of If-Match.
The request method is conditional
only if the selector does not match
anything.

If-None-Match: 4135cda4

If-Range If a client has a partial copy of
an object in its cache and wishes
to have an up-to-date copy of the
entire object there, it could use the
Range request header with this
header specifying a particular range
value to decide to update the file.
Modification selection can take
place on time as well.

If-Range: Wed, 01 Sep 2004
13:24:52 GMT

If-Unmodified-
Since

If the requested file has not been
modified since the specified time,
the server should perform the
requested method; otherwise, the
method should fail.

If-Unmodified-Since: Wed, 01
Sep 2004 13:24:52 GMT

Max-Forwards Indicates the limit of the number
of proxies or gateways that can
forward the request. Often ignored
in practice and used only with the
TRACE method.

Max-Forwards: 6

Proxy-
Authorization

Allows the client to identify itself
or the user to a proxy that requires
authentication.

Proxy-Authorization: Basic,
QWxhZGRpbjpvcGVuIHNlc2FtZQ==

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