Вы находитесь на странице: 1из 3

Chapter 9 Applications

World Wide Web and HTTP


The Web is a set of cooperating clients and servers, all of whom
speak HTTP
o Web clients (browsers) retrieve and display web pages
o Web servers store web pages and deliver them to web clients
over the Internet
A web page may contain text, images, and other objects, such as
audio clips, video clips, and Java applets
Web pages and their embedded objects are addressable by Uniform
Resource Locators (URLs)
o A URL has 3 parts: protocol, host name, and path of the file to
be fetched
o An example URL:
http://www.cs.someschool.edu/courses/ugradcourses.html
o If you open the example URL, your Web browser will open a
TCP connection to the Web server at a machine named
www.cs.someschool.edu and retrieve and display the file
named /courses/ugradcourses.html.
HyperText Transfer Protocol (HTTP) is an application protocol used
to communicate between web clients and web servers
o Defined in RFC 1945 (http/1.0) and RFC 2616 (http/1.1)
o Web clients send request messages to web server; web servers
send response messages to web clients
Format of request and response messages


Request operations
GET retrieve document identified in URL
HEAD - identical to GET except that the server must
not return any Message Body in the response
POST- give information to server (e.g., posting a
message to a bulletin board, submitting a form)
o TCP connections
HTTP 1.0 uses non-persistent connections a separate
TCP connection is established for each object retrieved
from the server
HTTP 1.1 supports persistent connections the client and
server can exchange multiple request/response messages
over the same TCP connection
Reducing the server load, network load, and delay
perceived by user due to reduced connection setup
and teardown overhead
Caching
o Retrieving a page from a cache close to the client can reduce
the response time for the client request and reduce server and
network load
o Caching can be implemented in different places
A browser can cache recently accessed pages
A site can support a single site-wide cache; the caching
host is called a proxy
An Internet service provider (ISP) can cache pages at a
router


o How does a cache ensure that it does not return a stale page?
Server may specify the expiration date and time of a page
using the Expires header; the cache need not re-verify
the page before this date and time
The cache can use the HEAD or conditional GET operation
(GET with If-Modified-Since header line) to verify that
it has the most recent copy of the page

Вам также может понравиться