2.2 Web and HTTP

来源:互联网 发布:mac重装系统失败 编辑:程序博客网 时间:2024/05/18 15:52

- URL(universal resource locate)

ex.www.someschool.edu/someDept/pic.gif(include hostname and pathname)

HTTP: hypertext transfer protocol

Nonpersistent HTTP

suppose user enters URL:www.someSchool.edu/someDepartment/home.index

1a. HTTP client initiates TCP connection to HTTP server (process) at www.someSchool.edu on port 80

1b. HTTP server at host www.someSchool.edu waiting for TCP connection at port 80.  “accepts” connection, notifying client

2. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.index

3. HTTP server receives request message, forms response message containing requested object, and sends message into its socket

4. HTTP server closes TCP connection. 

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


components of cookies

1) cookie header line of HTTP response message
2) cookie header line in HTTP request message
3) cookie file kept on user’s host, managed by user’s browser
4) back-end database at Web site


fmi:http://zhidao.baidu.com/question/13967823.html


原创粉丝点击