introduction to web programming Request Headers Under HTTP/1.0 an HTTP transaction consisted of a header followed by an empty line and then some extra data.

The header communicates administrative information that the web browser and web server could use to define exactly what they would be exchanging. The following table outlines the most important headers:

Header Description
Accept Specifies what types of media output the client is prepared to handle. Often, a client will specify several types of media that is can handle such as in the following case

    Accept: image/gif
    Accept: image/jpeg

Alternatively, a web browser might specify that it is prepared to handle "any" media using the following line:

    Accept: */*
Authorization Specifies whether or not the user has permission to access a secure area.
Content-encoding Specifies that the message body is encrypted, compressed, or encoded
Content-type Indicates the media type of the information in the message body.
Content-length Specifies the number of bytes in the message body for requests with a message body
Date Indicates the date and time of a request if the request has a message body
From Provides the email address of the user using the client if it is available
If-modified-since Tells the server not to deal with the request if the document has not been modified since a given time.
Mime-version Specifies the MIME version used to generate the message body.
Pragma Contains any additional information that the client wishes to specify to the server
Referer Indicates the URL of the page from which the request was made. (This request header is misspelled in the protocol itself)
User-agent Specifies the name and version number of the web browser making the request.

Previous | Next | Table of Contents