Example of Anchor Tag in HTML Other Markup Languages iNput Extensible Markup Language(XML) The text is published by <aHref=httP://www.prenhall.com> Tag names can be created as needed Prentice Hall, </A> one of the Example for a corporate phone book: larger publishers of Computer Science textbooks Produces The text is published by Prentice Hall, one of ace koem 32 C/OrSon the larger publishers of Computer Science 物765555-1234/ Caching in Browsers Types of Web Pages Cache for recently accessed a stati HTML pages Stored in file Item normally fetched from cache Dynamic Formed by server Http can verify timestamp before Created on demand fetching new copy Output from a program Use Common Gateway Interface(CGr) Types of Web Pages(cont) Summary of Web Document Types Active Web documents can be grouped into Executed at client depending on when the information in Consists of a computer program Can interact with user uthor revises the dour Use Java technology whenever a ation displayed by an active document e after the document has been loaded into a browser
6 哈工大计算机学院 李全龙 Network Application Development Server Software Design 31 Example of Anchor Tag in HTML Input The text is published by <A HREF=http://www.prenhall.com> Prentice Hall, </A> one of the larger publishers of Computer Science textbooks. Produces The text is published by Prentice Hall, one of the larger publishers of Computer Science textbooks. 哈工大计算机学院 李全龙 Network Application Development Server Software Design 32 Other Markup Languages Extensible Markup Language (XML) does not specify layout Tag names can be created as needed Example for a corporate phone book: 哈工大计算机学院 李全龙 Network Application Development Server Software Design 33 Caching in Browsers Cache for recently accessed HTML pages Images Item normally fetched from cache User can override HTTP can verify timestamp before fetching new copy 哈工大计算机学院 李全龙 Network Application Development Server Software Design 34 Types of Web Pages Static Stored in file Unchanging Dynamic Formed by server Created on demand Output from a program Use Common Gateway Interface (CGI) technology 哈工大计算机学院 李全龙 Network Application Development Server Software Design 35 Types of Web Pages (cont) Active Executed at client Consists of a computer program Can interact with user Use Java technology 哈工大计算机学院 李全龙 Network Application Development Server Software Design 36 Summary of Web Document Types Web documents can be grouped into three categories depending on when the information in the document changes. The information in a static document remains unchanged until the author revises the document. The information in a dynamic document can change whenever a server receives a request for the document. Information displayed by an active document can change after the document has been loaded into a browser
Http Http Overview httpUnderlyingprotocolofthe Transaction oriented client/server rotocol World wide Web Usually between Web browser(client)and transmitting information with efficiency necessary for hypertext a Uses TcP connections a Stateless Can transfer plain text, hypertext Each new TCP connection ction audio, images, and Internet accessible Terminate connection when transaction information Key Terms Examples of Http Operation CcE s Origin server 里一一二国 User age Intermediate Http Systems P 0×y A proxy acts on behalf other clients and presents requests from other 皇题 clients to a server Two scenarios need use proxy: Differentversionsofhttp xy is a forwarding
7 哈工大计算机学院 李全龙 Network Application Development Server Software Design 37 HTTP http: Underlying protocol of the World Wide Web transmitting information with efficiency necessary for hypertext jumps Can transfer plain text, hypertext, audio, images, and Internet accessible information 哈工大计算机学院 李全龙 Network Application Development Server Software Design 38 HTTP Overview Transaction oriented client/server protocol Usually between Web browser (client) and Web server Uses TCP connections Stateless Each transaction treated independently Each new TCP connection for each transaction Terminate connection when transaction complete 哈工大计算机学院 李全龙 Network Application Development Server Software Design 39 Key Terms Cache Client Connection Entity Gateway Message Origin server Proxy Resource Server Tunnel User agent 哈工大计算机学院 李全龙 Network Application Development Server Software Design 40 Examples of HTTP Operation 哈工大计算机学院 李全龙 Network Application Development Server Software Design 41 Intermediate HTTP Systems 哈工大计算机学院 李全龙 Network Application Development Server Software Design 42 Proxy A proxy acts on behalf other clients and presents requests from other clients to a server Two scenarios need use proxy: Security intermediary Different versions of HTTP A proxy is a forwarding agent
Gateway Tunnel A gateway is a server that appears to Tunnel performs no operation on the client as if it were an origin Http requests and responses A tunnel is simply a relay point It acts on behalf of other servers between two TCp connections that may not be able to communicate directly with a client Http messages pass the tunnel WiThout any changes a Two scenarios need use gateway Security intermediary .Non-httpservers Http Messages Http Message stRucture Request Request Line Request Header or Response Response lin Entity Hender General header Request header Entity Body General Header Fields Request Methods Cache control Request-line= Method <sp> Request_url <sp>htTp-versIon a Connection Methods: a Date Forwarded Keep alive MIME version Pragma rade Extersion-method 8
8 哈工大计算机学院 李全龙 Network Application Development Server Software Design 43 Gateway A gateway is a server that appears to the client as if it were an origin server. It acts on behalf of other servers that may not be able to communicate directly with a client. Two scenarios need use gateway: Security intermediary Non-HTTP servers 哈工大计算机学院 李全龙 Network Application Development Server Software Design 44 Tunnel Tunnel performs no operation on HTTP requests and responses. A tunnel is simply a relay point between two TCP connections. HTTP messages pass the tunnel without any changes. Use? 哈工大计算机学院 李全龙 Network Application Development Server Software Design 45 HTTP Messages Requests Client to server Responses Server to client Request line Response line General header Request header Response header Entity header Entity body 哈工大计算机学院 李全龙 Network Application Development Server Software Design 46 HTTP Message Structure 哈工大计算机学院 李全龙 Network Application Development Server Software Design 47 General Header Fields Cache control Connection Date Forwarded Keep alive MIME version Pragma Upgrade 哈工大计算机学院 李全龙 Network Application Development Server Software Design 48 Request Methods Request-Line = Method <SP> Request_URL <SP> HTTP-Version <CRLF> Methods: Options Get Head Post Put Patch Copy Move Delete Link Unlink Trace Wrapped Extension-method