网络原理课程的有课件9.pptVIP

  • 4
  • 0
  • 约1.48万字
  • 约 74页
  • 2018-10-15 发布于江苏
  • 举报
网络原理课程的有课件9

9.7 WWW (6) 超文本标记语言HTML HTML使用一套标记符号来实现对文本的格式化; HTML 2.0引入了对表格的支持,允许用户填充信息并将其送回服务器。服务器方使用一个CGI程序进行处理。 http example Suppose user enters URL www.someS/someDepartment/home.index 1a. http client initiates TCP connection to http server (process) at www.someS. Port 80 is default for http server. 2. http client sends http request message (containing URL) into TCP connection socket 1b. http server at host www.someS waiting for TCP connection at port 80. “accepts” connection, notifying client 3. http server receives request message, forms response message containing requested object (someDepartment/home.index), sends message into socket time (contains text, references to 10 jpeg images) http example (cont.) 5. http client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects 4. http server closes TCP connection. time 非持久连接和持久连接 非持久连接(Non-persistent) HTTP/1.0 服务器解析请求,发出响应报文后关闭连接 每个object的取得都需要两个RTT 每个object的传输都要经历慢启动 持久连接(Persistent) default for HTTP/1.1 在同一个TCP连接上: 服务器解析请求并响应,再解析新的请求… 客户端一旦得到基本的HTML文件就发出请求索取全部object 较少的RTT和慢启动时间 But most 1.0 browsers use parallel TCP connections. Trying out http (client side) for yourself 1. Telnet to your favorite Web server: Opens TCP connection to port 80 (default http server port) at www.eurecom.fr. Anything typed in sent to port 80 at www.eurecom.fr telnet www.eurecom.fr 80 2. Type in a GET http request: GET /~ross/index.html HTTP/1.0 By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to http server 3. Look at response message sent by http server! 9.7 WWW (7) JAVA 产生的原因 HTML只能处理包含文本、表格和图象的静态页面,以及浏览器和服务器之间使用CGI的有限交互。利用JAVA设计交互式的主页。 工作过程 网页可以指向一个JAVA的applet(小应用程序),当浏览器请求时,applet会被下载至浏览器,并被浏览器中所包含的JAVA解释器执行。 JAVA系统包含三个部分 JAVA到字节代码的编译器 支持applet的浏览器 字节代码的解释器 Web Caches (proxy server) 用户设置浏览器通过Web缓存来访问Web 浏览器将所有http请求发给Web缓存 如果所请求object在缓存中,该object被立即通过http回答返回 否则Web缓存向原服务器发

文档评论(0)

1亿VIP精品文档

相关文档