SlideShare a Scribd company logo
1 of 36
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27-1  ARCHITECTURE The  WWW  today is a distributed client/server service, in which a client using a browser can access a service using a server. However, the service provided is distributed over many locations called sites. Client (Browser) Server Uniform Resource Locator Cookies Topics discussed in this section:
Figure 27.1  Architecture of WWW
Figure 27.2  Browser
Figure 27.3  URL
27-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 at which the contents of the document are determined. Static Documents Dynamic Documents Active Documents Topics discussed in this section:
Figure 27.4  Static document
Figure 27.5  Boldface tags
Figure 27.6  Effect of boldface tags
Figure 27.7  Beginning and ending tags
Figure 27.8  Dynamic document using CGI
Figure 27.9  Dynamic document using server-site script
Dynamic documents are sometimes referred to as server-site dynamic documents. Note
Figure 27.10  Active document using Java applet
Figure 27.11  Active document using client-site script
Active documents are sometimes referred to as client-site dynamic documents. Note
27-3  HTTP The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide Web. HTTP functions as a combination of FTP and SMTP.  HTTP Transaction Persistent Versus Nonpersistent Connection Topics discussed in this section:
HTTP uses the services of TCP on well-known port 80. Note
Figure 27.12  HTTP transaction
Figure 27.13  Request and response messages
Figure 27.14  Request and status lines
Table 27.1  Methods
Table 27.2  Status codes
Table 27.2  Status codes  (continued)
Figure 27.15  Header format
Table 27.3  General headers
Table 27.4  Request headers
Table 27.5  Response headers
Table 27.6  Entity headers
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 line and 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 27.16). Example 27.1
Figure 27.16  Example 27.1
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 27.17). Example 27.2
Figure 27.17  Example 27.2
HTTP uses ASCII characters. A client can directly connect to a server using TELNET, which logs into port 80 ( see next slide ). The next three lines show that the connection is successful. We then type three lines. The first shows the request line (GET method), the second is the header (defining the host), the third is a blank, terminating the request. The server response is seven lines starting with the status line. The blank line at the end terminates the server response. The file of 14,230 lines is received after the blank line (not shown here). The last line is the output by the client. Example 27.3
Example 27.3 (continued)
HTTP version 1.1 specifies a persistent connection by default. Note

More Related Content

What's hot (20)

29 Multimedia
29 Multimedia29 Multimedia
29 Multimedia
 
Chapter 22
Chapter 22Chapter 22
Chapter 22
 
Chapter 29 - Mutimedia
Chapter 29 - MutimediaChapter 29 - Mutimedia
Chapter 29 - Mutimedia
 
21 Network Layer_Address_Mapping_Error_Reporting_and_Multicasting
21 Network Layer_Address_Mapping_Error_Reporting_and_Multicasting21 Network Layer_Address_Mapping_Error_Reporting_and_Multicasting
21 Network Layer_Address_Mapping_Error_Reporting_and_Multicasting
 
Ch22
Ch22Ch22
Ch22
 
Ch13
Ch13Ch13
Ch13
 
22 Network Layer_Delivery_forwarding_and_Routing
22 Network Layer_Delivery_forwarding_and_Routing22 Network Layer_Delivery_forwarding_and_Routing
22 Network Layer_Delivery_forwarding_and_Routing
 
Cs8591 u4
Cs8591 u4Cs8591 u4
Cs8591 u4
 
20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks 20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks
 
Meeting 11. electronic mail: smtp
Meeting 11. electronic mail: smtpMeeting 11. electronic mail: smtp
Meeting 11. electronic mail: smtp
 
Ch18
Ch18Ch18
Ch18
 
Ars msr 1-intradomain
Ars msr 1-intradomainArs msr 1-intradomain
Ars msr 1-intradomain
 
02 Network Models
02 Network Models02 Network Models
02 Network Models
 
08 Switching
08 Switching08 Switching
08 Switching
 
Ch14
Ch14Ch14
Ch14
 
4c Address Mapping, Error Reporting and Multicasting
4c Address Mapping, Error Reporting and Multicasting4c Address Mapping, Error Reporting and Multicasting
4c Address Mapping, Error Reporting and Multicasting
 
Cs8591 Computer Networks
Cs8591 Computer NetworksCs8591 Computer Networks
Cs8591 Computer Networks
 
A day in the life of a Web Request
A day in the life of a Web RequestA day in the life of a Web Request
A day in the life of a Web Request
 
Ch 19
Ch 19Ch 19
Ch 19
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
 

Viewers also liked (20)

App A
App AApp A
App A
 
Ch15
Ch15Ch15
Ch15
 
Ch19
Ch19Ch19
Ch19
 
Inter quiz
Inter quizInter quiz
Inter quiz
 
Ch25
Ch25Ch25
Ch25
 
Ch16
Ch16Ch16
Ch16
 
Ch10
Ch10Ch10
Ch10
 
Ch09
Ch09Ch09
Ch09
 
Ch07
Ch07Ch07
Ch07
 
Ch17
Ch17Ch17
Ch17
 
Ch06
Ch06Ch06
Ch06
 
Chapter 15 - Security
Chapter 15 - SecurityChapter 15 - Security
Chapter 15 - Security
 
Chapter 4 - Threads
Chapter 4 - ThreadsChapter 4 - Threads
Chapter 4 - Threads
 
Ch24
Ch24Ch24
Ch24
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
 
Ch12
Ch12Ch12
Ch12
 
Chapter 14 - Protection
Chapter 14 - ProtectionChapter 14 - Protection
Chapter 14 - Protection
 
Chapter 2 - Network Models
Chapter 2 - Network ModelsChapter 2 - Network Models
Chapter 2 - Network Models
 
Chapter 17 - Distributed File Systems
Chapter 17 - Distributed File SystemsChapter 17 - Distributed File Systems
Chapter 17 - Distributed File Systems
 

Similar to Ch27

transfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imaptransfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imapAKSHIT KOHLI
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...WebStackAcademy
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Syed Ariful Islam Emon
 
Web Technologies -- Servlets 4 unit slides
Web Technologies -- Servlets   4 unit slidesWeb Technologies -- Servlets   4 unit slides
Web Technologies -- Servlets 4 unit slidesSasidhar Kothuru
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfRaghunathan52
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfRaghunathan52
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods pptkamal kotecha
 
An implementation of embedded RESTful Web services.pdf
An implementation of embedded RESTful Web services.pdfAn implementation of embedded RESTful Web services.pdf
An implementation of embedded RESTful Web services.pdfNaomi Hansen
 
Session 1 introduction servlet - Giáo trình Bách Khoa Aptech
Session 1   introduction servlet - Giáo trình Bách Khoa AptechSession 1   introduction servlet - Giáo trình Bách Khoa Aptech
Session 1 introduction servlet - Giáo trình Bách Khoa AptechMasterCode.vn
 
PowerPoint_merge.ppt
PowerPoint_merge.pptPowerPoint_merge.ppt
PowerPoint_merge.pptssuser3b47e6
 

Similar to Ch27 (20)

Ch27
Ch27Ch27
Ch27
 
27 WWW and_HTTP
27 WWW and_HTTP27 WWW and_HTTP
27 WWW and_HTTP
 
ch27-www-and-http.ppt
ch27-www-and-http.pptch27-www-and-http.ppt
ch27-www-and-http.ppt
 
transfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imaptransfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imap
 
Cs8591 Computer Networks
Cs8591 Computer NetworksCs8591 Computer Networks
Cs8591 Computer Networks
 
Chap-22.ppt
Chap-22.pptChap-22.ppt
Chap-22.ppt
 
Chap 22 www http
Chap 22 www httpChap 22 www http
Chap 22 www http
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
 
An Introduction to HTTP
An Introduction to HTTPAn Introduction to HTTP
An Introduction to HTTP
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3
 
Web Technologies -- Servlets 4 unit slides
Web Technologies -- Servlets   4 unit slidesWeb Technologies -- Servlets   4 unit slides
Web Technologies -- Servlets 4 unit slides
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdf
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdf
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
 
An implementation of embedded RESTful Web services.pdf
An implementation of embedded RESTful Web services.pdfAn implementation of embedded RESTful Web services.pdf
An implementation of embedded RESTful Web services.pdf
 
Session 1 introduction servlet - Giáo trình Bách Khoa Aptech
Session 1   introduction servlet - Giáo trình Bách Khoa AptechSession 1   introduction servlet - Giáo trình Bách Khoa Aptech
Session 1 introduction servlet - Giáo trình Bách Khoa Aptech
 
Ch 27
Ch 27Ch 27
Ch 27
 
PowerPoint_merge.ppt
PowerPoint_merge.pptPowerPoint_merge.ppt
PowerPoint_merge.ppt
 

More from Wayne Jones Jnr (9)

Ch23
Ch23Ch23
Ch23
 
Ch20
Ch20Ch20
Ch20
 
Ch08
Ch08Ch08
Ch08
 
Operating System Concepts - Ch05
Operating System Concepts - Ch05Operating System Concepts - Ch05
Operating System Concepts - Ch05
 
Ch32
Ch32Ch32
Ch32
 
Ch31
Ch31Ch31
Ch31
 
Chapter 30 - Cry
Chapter 30 - CryChapter 30 - Cry
Chapter 30 - Cry
 
Chapter 4 - Digital Transmission
Chapter 4 - Digital TransmissionChapter 4 - Digital Transmission
Chapter 4 - Digital Transmission
 
Chapter 3 - Data and Signals
Chapter 3 - Data and SignalsChapter 3 - Data and Signals
Chapter 3 - Data and Signals
 

Ch27

  • 1. Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
  • 2. 27-1 ARCHITECTURE The WWW today is a distributed client/server service, in which a client using a browser can access a service using a server. However, the service provided is distributed over many locations called sites. Client (Browser) Server Uniform Resource Locator Cookies Topics discussed in this section:
  • 3. Figure 27.1 Architecture of WWW
  • 4. Figure 27.2 Browser
  • 6. 27-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 at which the contents of the document are determined. Static Documents Dynamic Documents Active Documents Topics discussed in this section:
  • 7. Figure 27.4 Static document
  • 8. Figure 27.5 Boldface tags
  • 9. Figure 27.6 Effect of boldface tags
  • 10. Figure 27.7 Beginning and ending tags
  • 11. Figure 27.8 Dynamic document using CGI
  • 12. Figure 27.9 Dynamic document using server-site script
  • 13. Dynamic documents are sometimes referred to as server-site dynamic documents. Note
  • 14. Figure 27.10 Active document using Java applet
  • 15. Figure 27.11 Active document using client-site script
  • 16. Active documents are sometimes referred to as client-site dynamic documents. Note
  • 17. 27-3 HTTP The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide Web. HTTP functions as a combination of FTP and SMTP. HTTP Transaction Persistent Versus Nonpersistent Connection Topics discussed in this section:
  • 18. HTTP uses the services of TCP on well-known port 80. Note
  • 19. Figure 27.12 HTTP transaction
  • 20. Figure 27.13 Request and response messages
  • 21. Figure 27.14 Request and status lines
  • 22. Table 27.1 Methods
  • 23. Table 27.2 Status codes
  • 24. Table 27.2 Status codes (continued)
  • 25. Figure 27.15 Header format
  • 26. Table 27.3 General headers
  • 27. Table 27.4 Request headers
  • 28. Table 27.5 Response headers
  • 29. Table 27.6 Entity headers
  • 30. 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 line and 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 27.16). Example 27.1
  • 31. Figure 27.16 Example 27.1
  • 32. 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 27.17). Example 27.2
  • 33. Figure 27.17 Example 27.2
  • 34. HTTP uses ASCII characters. A client can directly connect to a server using TELNET, which logs into port 80 ( see next slide ). The next three lines show that the connection is successful. We then type three lines. The first shows the request line (GET method), the second is the header (defining the host), the third is a blank, terminating the request. The server response is seven lines starting with the status line. The blank line at the end terminates the server response. The file of 14,230 lines is received after the blank line (not shown here). The last line is the output by the client. Example 27.3
  • 36. HTTP version 1.1 specifies a persistent connection by default. Note