httpheaders.com
:: overview :: header fields :: header viewer :: articles :: links :: contact :: home :: 
Header Fields


:: General Headers :: Request Headers :: Response Headers :: Entity Headers ::

Accept
Accept-Charset
Accept-Encoding
Accept-Language
Authorization
Expect
From
Host
If-Match
If-Modified-Since
If-None-Match
If-Range
If-Unmodified-Since
Max-Forwards
Proxy-Authorization
Range
Referer
TE
User-Agent




Accept

This field indicates the data types accepted by the browser. An entry of */* indicates anything is accepted; however, it is possible to indicate particular content types such as image/jpeg so the server can make a decision on what to return. This facility could be used to introduce a form of content negotiation so that a browser could be served only data it understands or prefers, although this approach is not widely understood or implemented.

Example:

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
back to top



Accept-Charset

This field indicates the character set that is accepted by the browser, such as ASCII or foreign character encodings.

Example:

Accept-Charset: iso-8859-1,*,utf-8
back to top



Accept-Encoding

This field instructs the server on what type of encoding the browser understands. In general, this field is used to let the server whether or not compressed data can be handled.

Example:

Accept-Encoding: x-compress
back to top



Accept-Language

This field lists the languages preferred by the browser and could be used by the server to pass back the appropriate language data.

Example:

Accept-Language: en
back to top



Authorization

This field is typically used to indicate the userid and encrypted password if the user is returning authorization information.

Example:

Authorization: user joeuser:joepassword
back to top



Expect

Indicates that particular server behaviors are required by the client.

Example:

Expect: 100-continue
back to top



From

The Internet e-mail address for the human user who controls the requesting browser or other client.

Example:

From: info@httpheaders.com
back to top



Host

This field indicates the host and port of the server to which the request is being made.

Example:

Host: www.httpheaders.com
back to top



If-Match

This field makes a request conditionally only if the items match some selector value passed in. Imagine only using POST to add data once it has been moved to a file called olddata.

Example:

If-Match: "olddata"
back to top



If-Modified-Since

This field indicates file freshness to improve the efficiency of the GET method. 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.

Example:

If-Modified-Since: Mon, 5 Aug 2002 19:43:31 GMT
back to top



If-None-Match

This field does the opposite of If-Match. The method is conditional only if the selector does not match anything. This might be useful for preventing overwrites of existing files.

Example:

If-None-Match: "newfile"
back to top



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 conditional If-Range modifier to update the file. Modification selection can take place on time as well.

Example:

If-Range: Mon, 5 Aug 2002 19:43:31 GMT
back to top



If-Unmodified-Since

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

Example:

If-Unmodified-Since: Mon, 5 Aug 2002 19:43:31 GMT
back to top



Max-Forwards

This field is used with the TRACE method to limit the number of proxies or gateways that can forward the request. This would be useful to determine failures if a request moves through many proxies before reaching the final server.

Example:

Max-Forwards: 6
back to top



Proxy-Authorization

This field allows the client to identify itself or the user to a proxy that requires authentication.

Example:

Proxy-Authorization: NTLM TlRMTVNTUAABAAAAB7IAAAsACwAtAAAA
back to top



Range

This field requests a particular range of a file such as a certain number of bytes. The example shows a request for the last 512 bytes of a file.

Example:

Range: bytes=-512
back to top



Referer

This field indicates the URL of the document from which the request originates. This value might be empty if the user has entered the URL directly rather than by following a link or if coming from a secure socket layer.

Example:

Referer: http://www.httpheaders.com/index.html
back to top
Note:
With the Referer header field, you can:
- Track who is linking to your site
- Force users to enter your site through an entry page. With a simple server-side script, detect the referer on the leaf pages of your site. If the referer is not a page from your site, you redirect the user to your entry page.



TE

Indicates what extension transfer-codings the client is willing to accept in the response and whether or not it is willing to accept trailer fields in a chunked transfer-coding.

Example:

TE: trailers, deflate;q=0.5
back to top



User-Agent

This field indicates the type of browser making the request.

Example:

User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
back to top

Note:
The User-Agent header field can be very useful. However, the User-Agent string can be spoofed. So be careful when delivering site content based on the value of this header field.




[ overview ] [ header fields ] [ header viewer ] [ articles ] [ links ] [ contact ] [ home ]
info@httpheaders.com
© 2002-2009 HTTPheaders.com