0% found this document useful (0 votes)
22 views8 pages

Lecture 4

Uploaded by

Rana Khizar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views8 pages

Lecture 4

Uploaded by

Rana Khizar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Lecture 4

Chapter 2
Article 2.2.4 – 2.2.5
User-Server Interaction: Cookies
• An HTTP server is stateless.
• This simplifies server design and has permitted engineers to develop high-
performance Web servers that can handle thousands of simultaneous TCP
connections.
• However, it is often desirable for a Web site to identify users,
• Either because the server wishes to restrict user access
• it wants to serve content as a function of the user identity.
• For these purposes, HTTP uses cookies. Cookies, allow sites to keep track of
users.
• Most major commercial Web sites use cookies today.
User-Server Interaction: Cookies
User-Server Interaction: Cookies
• Server exactly which pages user 1678 visited, in which order, and at what times!
• Server(Amazon) also recommends products to Client based on Web pages he/she has
visited at Amazon in the past.
• This is how Amazon and other e-commerce sites provide “one-click shopping”
• If Susan also registers herself with Amazon—providing full name, e-mail, address, postal
address, and credit card information—Amazon can then include this information in its
database, —when client chooses to purchase an item during a subsequent visit, he/she
doesn’t need to re-enter her name, credit card number, or address.
• Although cookies often simplify the Internet shopping experience for the user, they are
controversial because they can also be considered as an invasion of privacy.
• Using a combination of cookies and user-supplied account information, a Web site can
learn a lot about a user and potentially sell this information to a third party.
Web Caching
• A Web cache—also called a 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 user’s browser can be configured so that all
of the user’s HTTP requests are first directed to
the Web cache [RFC 7234].
• Once a browser is configured, each browser
request for an object is first directed to the
Web cache.
Web Caching
• Note that a cache is both a server and a client at the same time. When it receives requests from
and sends responses to a browser, it is a server. When it sends requests to and receives responses
from an origin server, it is a client.
• Typically a Web cache is purchased and installed by an ISP.
• For example, a university might install a cache on its campus network and configure all of the
campus browsers to point to the cache.
• Web caching has seen deployment in the Internet for two reasons. First, a Web cache can
substantially reduce the response time for a client request,
• Web caches can substantially reduce traffic on an institution’s access link to the Internet.
By reducing traffic, the institution (for example, a company or a university) does not have to
upgrade bandwidth as quickly, thereby reducing costs.
• Furthermore, Web caches can substantially reduce Web traffic in the Internet as a whole.
The Conditional GET
• Although caching can reduce user-perceived response times, it introduces a new problem—the
copy of an object residing in the cache may be stale.
• The object housed in the Web server may have been modified since the copy was cached at the
client.
• HTTP has a mechanism that allows a cache to verify that its objects are up to date. This
mechanism is called the conditional GET
• To illustrate how the conditional GET operates, let’s walk through an example.
The Conditional GET
• Second, the Web server sends a response message with the
requested object to the cache:

You might also like