1. Overview of the World Wide Web
2. HTTP
2.1 Features of HTTP
The same customer has no record of visiting the same website
Stateless
2.2 HTTP connection method
2.2.1 Non-persistent connection
Request three connections, that is, connect based on TCP
If you send data again, you need to go through three handshake again
2.2.2 Persistent connection
Non-pipelined: you send it to me, I will send it to you
Pipeline: continuous transmission
Message structure
Request message
Method : Command
URL : Identifier
Version : What version of the HTTP protocol
Header line : Some information about the browser, server, and message body
Connection: indicates that the current is a non-persistent connection
Cookie: indicates that you have visited
Response message
- Start with 1: indicate notification message
- 2 starts with: indicates success. 202 Accepted
- 3 beginning: indicates redirection, further action must be taken to complete the request
- 4 beginning: indicates the customer's error, the request has an incorrect grammar can not complete 404
- Start with 5: indicates the server's error, such as server failure and unable to complete the request