0% found this document useful (0 votes)
49 views15 pages

Hypertext Transfer Protocol (HTTP) : Shweta Dubey

HTTP is the protocol that governs data communication for the World Wide Web. It is a request-response protocol that runs on top of TCP. An HTTP request includes a start line with the request method, URI, and HTTP version. The response includes a status line indicating if the request was satisfied. Caching servers can store copies of frequently requested resources to improve response times.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views15 pages

Hypertext Transfer Protocol (HTTP) : Shweta Dubey

HTTP is the protocol that governs data communication for the World Wide Web. It is a request-response protocol that runs on top of TCP. An HTTP request includes a start line with the request method, URI, and HTTP version. The response includes a status line indicating if the request was satisfied. Caching servers can store copies of frequently requested resources to improve response times.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

HyperText Transfer

Protocol (HTTP)
Shweta Dubey
WHAT IS A PROTOCOL AND HTTP?
● Protocol: A Protocol is a standard procedure for defining and regulating
communication. For example TCP, UDP, HTTP etc.

● HTTP is the foundation of data communication for the World Wide Web.
● The HTTP is the Web’s application-layer protocol for transferring various
forms of data between server and client like plaintext, hypertext, image, videos
and sounds .
HTTP
Transfer protocol used throughout the WWW

● It is a request-response protocol

● It is stateless
● Runs on top of TCP on the standardized port 80
● The format of the request and response messages is dictated by HTTP
HOW HTTP WORKS?
● HTTP is implemented in two programs: a client program and a server
program, executing on different end systems, talk to each other by exchanging
HTTP messages.
● The HTTP client first initiates a TCP connection with the server. Once the
connection is established, the browser and the server processes access TCP
through their socket interfaces.
HTTP Request Message
Overall Structure:

Every HTTP request message has the same basic structure:

● Start line

● Header field(s) (one or more)


● Blank line
● Message body (optional)
Every start line consists of three parts, with a single space used to separate adjacent
parts:

● Request method

● Request-URI portion of web address


● HTTP version
Request-URI
The concatenation of the string http://, the value of the Host header field (domain
name), and the Request-URI forms a string known as a Uniform Resource Identifier.
HTTP/1.0 vs HTTP/1.1
In http 1.0, after the connection established, a single request sent over and a single
response sent back

● HTTP 1.1 support persistent connections

● Establish a TCP connection send a request and get a response


Request Method
HTTP Response Message
an HTTP response message consists of a status line, header fields, and the body of
the response, in the following format:

● Status line

● Header field(s) (one or more)


● Blank line
● Message body (optional)
● Every request gets a response consisting of a status line, and possibly
additional information.
● It contains a three-digit status code telling whether the request was satisfied,
and if not, why not
● first digit is used to divide the responses into five major groups
Some headers can be used in either direction
WEB CACHING
● Also called proxy server, is a network entity that satisfies HTTP requests on the
behalf of an origin Web server.
● The Web cache has its own disk storage and keeps copies of recently requested
objects in this storage.
● A Web cache can substantially reduce the response time for a client request,
particularly if the bandwidth between the client and the origin server is much
less than the bandwidth between the client and the cache.
● Web caches can substantially reduce traffic

You might also like