Professional Documents
Culture Documents
• Web pages
• Web browser and web server
• Data representation standard
Web pages
• Large set of documents that are accessible
to internet users
• Each web page is classified as a
hypermedia document
hyper means document can contain
selectable links that refer to other
documents
media means document can contain items
other than text (e.g., graphics images)
Web browser and Web server
• Web browser - An application program that
user invokes to access and display a web
page
Client that contacts a web server to obtain
a copy of a specified page
• Web server - A given web server can
manage more than one page
Data representation standard
Content-Length: 34
Content-Language: en
Content-Encoding: ascii
• Types of negotiation
Server-driven
Agent driven (Browser driven)
Server driven negotiation
• Request from browser specifies a list of
preferences along with URL of the desired
document
• Server selects, from among available
options, one that satisfies the browser’s
preferences
Agent driven negotiation
• Browser sends a request to the server to
ask what is available
• The server returns a list of possibilities
• The browser selects one of them and
sends a second request to obtain
document
Note –
Disadvantage – two server interactions
Advantage - Browser retains control over choice
Negotiation
• A browser uses a HTTP Accept: header
Accept: text/html, text/plain; q=0.5, text/x-dvi; q=0.8
[ q is preference level]
Browser is indicating preferences
text/html
text/x-dvi
text/plain
• Variety of Accept headers exist
Accept-Encoding:
Accept-Charset:
Accept-Language:
Conditional Requests
• When a browser sends a request, it includes
a header that qualifies conditions under
which the request should be honored
If the specified condition is not met, the
server does not return the requested
document
• Advantage - Unnecessary transfers avoided
Conditional Requests
• Example
If-Modified-Since: Mon, 01 Apr 2013 05:00:01 GMT
Proxies along the way and browser will get a fresh copy from server