FREE online courses on Internet Network of Networks - World wide Web - HTTP
HyperText Transport Protocol
Since 1990, the Web has used HTTP, the protocol that defines
how clients form requests and how Web servers respond to those requests. In
short, HTTP describes how the Web transports Web pages.
HTTP is a plain text protocol, which means that you could
read and understand each command sent to the server . A browser sends a request
to the Web server, which in turn replies with a response. The first line of a
request is usually GET method or POST method, which contains the URL of the
resource (file, script, program, and so on.) and the version of HTTP that the
browser is using. A handful of headers follow the method and provide additional
information required by the Web server. Each header has the same format: name:
value. The user-agent header describes the users browser to the server, for
example, HTTP defines a large variety of other headers, too. A complete request
might look something like this:
GET index.html HTTP/1.0 accept: image/gif, image/jpeg,
image/png, */* user-agent: Mozilla/4.0 (compatible; MSIE 4.0; Windows 95)
connection: Keep-Alive.
The browser replies with a response that begins with the
servers HTTP version and a response code, which you might see from time to time
when a server returns an error. The response then follows with a handful of
headers that describe the server, the length of the content, and the content
type (MIME type). The actual content follows these headers. A complete HTTP
response could look like this:
HTTP/1.0 200 OK Server: Netscape-Communications/1.12
Last-modified: Wednesday, 01-Oct-97 02:55:33 GMT Content-length: 20
Content-type: text/plain This is the simple text.