Introduction to networking - CH.3.1 Web and Http

Introduction to networking

Web and HTTP


Web page have objects - they can be HTML, JPEG, Java applet, Audio files ...
Each Object is addressed by a URL:

www.abc.com/cde/def.jpg

HTTP - Hypertext transfer protocol

  1. Is a Application Layer protocol
  2. Is a Client-server mode
  3. Client - web browser
  4. Server - Web server
  5. Have HTTP 1.0/HTTP1.1
  6. Using TCP
  7. nonpersistent HTTP
    • At most one object is sent over a TCP connection
  8. persistent HTTP
    • Multiple objects can be send over a TCP connection

Remember: Definition of RTT: time to send a small packet to travel from client to server and back.

HTTP messages

  1. Request - Command: Get, Post, Head
  2. response

Keeping user-server state: How can I know you are logged in??

Use cookie

  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

What cookie can bring

  1. authorization (What is the difference of authorization & authentication?)
  2. recommendation
  3. user session state (Logged in / out)

Typical information encoded in cookies

  1. User ID
  2. IP addresses
  3. Expiration time of the cookie
  4. ...

Web cache

  1. Use to increase the performance of client
  2. Reduce work load of server
  3. Support conditional GET

1206, No. 1388 New Jinqiao Road, Jinqiao district, Shanghai, China
General Enquiry: info@yubis.net
Website: http://www.yubis.net