520 likes | 1.38k Views
Web Clients. Chapter 2. Web Protocols and Practice. WEB CLIENTS. Topics. Web Protocols and Practice. WEB CLIENTS. Web Client Definition. Web Protocols and Practice. WEB CLIENTS. Web Client Definition. Web Protocols and Practice. WEB CLIENTS. Browser Functions.
E N D
Web Clients Chapter 2 WebProtocolsandPractice
WEB CLIENTS Topics WebProtocolsandPractice
WEB CLIENTS Web Client Definition WebProtocolsandPractice
WEB CLIENTS Web Client Definition WebProtocolsandPractice
WEB CLIENTS Browser Functions WebProtocolsandPractice
Browser DNS server WEB CLIENTS 1 DNS query URL Origin server 2 TCP Connection 3 HTTP Request 4 HTTP Response 5 Optional parallel connections Figure 2.1. Steps in a browser process WebProtocolsandPractice
Figure 2.1 shows the various steps in the process involved in a Web request as processed by a typical browser. The selected URL is parsed to determine the Web server that must be contacted. A connection is set up with the server, and an HTTP request is sent with the URL to obtain the response.
WEB CLIENTS Table 2.1. User action leading to request generation WebProtocolsandPractice
WEB CLIENTS Canonical Web Transfer Example WebProtocolsandPractice
WEB CLIENTS Table 2.2.Resources referred to in the canonical example and their content type WebProtocolsandPractice
WEB CLIENTS Foo1.gif Foo2.gif Foo3.jpg Name: Address: :Credit Card :Book Title SUBMIT Mp.tv Book.cgi Figure 2.2. Container document foo.html WebProtocolsandPractice
WEB CLIENTS Browser Caching WebProtocolsandPractice
WEB CLIENTS Browser Caching WebProtocolsandPractice
WEB CLIENTS Issuing Request By Browser WebProtocolsandPractice
WEB CLIENTS Browser Configuration WebProtocolsandPractice
WEB CLIENTS Browser Configuration WebProtocolsandPractice
WEB CLIENTS Table 2.3.Helper applications launched based on file/content types WebProtocolsandPractice
Browser WEB CLIENTS Foo.ra Origin server 1 HTTP request for foo.ra 2 (Location, protocol) 3 Audio protocol request Media server Audio client Figure 2.3. Listening to audio data WebProtocolsandPractice
Figure 2.3: The user selects a resource http://www.bar.com/foo.ra, and the browser sends an HTTP request to the origin server www.bar.com for the resource foo.ca (step 1). The origin server sends back an HTTP response (step 2), but the content of the response is simply a pointer to the information. The response is meaningful only to an audio client rather than a Web browser. Typically, the response is a URL such as pnm://ra-ms.com/foo.ra, where pnm stands for "Progressive Network Media" and ra-ms is the media server on which the resource foo.ca resides. Because the browser has been configured to invoke the helper program based on the file type, it would invoke the real-audio client program, which would contact the media server ra-ms.com (step 3) and start downloading the audio content.
WEB CLIENTS Browser Configuration WebProtocolsandPractice
WEB CLIENTS Cookies WebProtocolsandPractice
WEB CLIENTS Cookies WebProtocolsandPractice
WEB CLIENTS Origin Server A Client Request Client Response Origin Server A Set-Cookie: XYZ Origin Server A Client Request Cookie: XYZ Figure 2.4. Client-server exchange of cookie information WebProtocolsandPractice
Figure 2.4 shows a client sending a request to an origin server (step 1). The origin server in its response includes the header (Set-cookie) with the cookie value (XYZ) (step 2). In all future requests to the origin server A, the client includes the cookie (step3, sent with the request via the header cookie).