Chapter 22 World Wide Web HTTP - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 22 World Wide Web HTTP

Description:

The WWW is a distributed client-server service, in which a client using a ... Bookmarking. Shopping carts. User ID and password storage. Counters for site statistics ... – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 36
Provided by: dpnmPos
Category:

less

Transcript and Presenter's Notes

Title: Chapter 22 World Wide Web HTTP


1
Chapter 22 World Wide Web (HTTP)
Mi-Jung Choi Dept. of Computer Science and
Engineering mjchoi_at_postech.ac.kr
2
22.1 Architecture
The WWW is a distributed client-server service,
in which a client using a browser can access a
service using a server. The service provided is
distributed over many locations called sites.
The topics discussed in this section include
Client (Browser) Server Uniform Resource
Locator (URL) Cookies
3
Architecture of WWW
4
Browser
5
URL
6
Cookies
  • Hyper Text Transfer Protocol (HTTP)
  • Manages the hypertext links used to navigate web
  • Ensures Web browsers correctly process and
    display the various types of information
    contained in Web pages
  • Original design ? stateless
  • No storage of persistent data
  • Reasons for maintaining state information
  • Page customization based on user preference
  • Temp storage of data in multipart forms
  • Bookmarking
  • Shopping carts
  • User ID and password storage
  • Counters for site statistics
  • Three basic methods for maintaining state
    information
  • Hidden form fields
  • Query strings
  • Cookies

7
Cookies
  • Saving State Information w/ Cookies
  • Cookies
  • Small pieces of information about a user stored
    by web server in text files on users computer
  • Allows information to be stored beyond the
    current Web page session
  • W3C DOM defines cookie specification
  • Two types
  • Temporary ? available only for current browser
    session
  • Persistent ? available beyond current browser
    session
  • Limitations
  • Maximum of 20 stored by each server or domain
  • Maximum of 300 total cookies per browser
  • Maximum size of 4 KB

8
22.2 Web Documents
The documents in the WWW can be grouped into
three broad categories static, dynamic, and
active. The category is based on the time the
contents of the document are determined.
The topics discussed in this section include
Static Documents Dynamic Documents Active
Documents
9
Static Document
10
Boldface Tags
11
Beginning Ending Tags
12
Dynamic Documents using CGI
13
Dynamic Documents using Server Side Script
14
Note
Dynamic documents are sometimes referred to as
server-site dynamic documents.
15
Active Document using Java Applet
16
Active Document using Client-site Script
17
Note
Active documents are sometimes referred to as
client-site dynamic documents.
18
22.3 HTTP
The Hypertext Transfer Protocol (HTTP) is a
protocol used mainly to access data on the World
Wide Web. HTTP functions like a combination of
FTP and SMTP.
The topics discussed in this section include
HTTP Transaction Persistent versus Nonpersistent
Connection Proxy Server
19
Note
HTTP uses the services of TCP on well-known port
80.
20
HTTP Transaction
21
Request Response Messages
22
Request Status Lines
23
Methods
24
Status Codes
25
Status Codes (Contd)
26
Header Format
27
General Headers
28
Request Headers
29
Response Headers
30
Entity Headers
31
Example 1
This example retrieves a document. We use the GET
method to retrieve an image with the path
/usr/bin/image1. The request line shows the
method (GET), the URL, and the HTTP version
(1.1). The header has two lines that show that
the client can accept images in the GIF or JPEG
format. The request does not have a body. The
response message contains the status lineand
four lines of header. The header lines define the
date, server, MIME version, and length of the
document. The body of the document follows the
header (see Figure 22.16).
See Next Slide ?
32
Example 1 Solution
33
Example 2
In this example, the client wants to send data to
the server. We use the POST method. The request
line shows the method (POST), URL, and HTTP
version (1.1). There are four lines of headers.
The request body contains the input information.
The response message contains the status line and
four lines of headers. The created document,
which is a CGI document, is included as the body
(see Figure 22.17).
See Next Slide ?
34
Example 2 Solution
35
Note
HTTP version 1.1 specifies a persistent
connection by default.
Write a Comment
User Comments (0)
About PowerShow.com