HTTP (Hypertext Transfer Protocol) is a transfer protocol used to transfer hypertext from a server to a local browser. It can make the browser more efficient and reduce network transmission. It can not only ensure that the computer can transmit hypertext documents correctly and quickly, but also decide which part of the document to transmit and which part of the content to display first (such as displaying text first and then displaying graphics).
HTTP function
No connection: No connection means limiting each connection to one request. After the server has processed the customer's request and received the customer's reply, it will disconnect. This method can save transmission time.
Media independence: This means that any type of data can be sent over HTTP as long as the client and server know how to handle the data content. The client and server specify the appropriate MIME type for transmission.
Stateless: HTTP protocol is stateless. Stateless means that the protocol has no memory to handle things. If the server doesn't need the previous information, it will respond faster. However, the lack of status means that if the previous information is needed for subsequent processing, it must be retransmitted, which may lead to an increase in the amount of data transmitted per connection. At this time, the cache can be set.
Http and HTTPS
The full name of HTTPS is hypertext transfer protocol over secure socket layer, which is an HTTP channel with security as its goal. Simply put, it is a secure version of HTTP, that is, SSL layer (Secure Sockets Layer) is added under HTTP, abbreviated as HTTPS. S is actually the first letter of the word security.
The security foundation of HTTPS is SSL, so the content transmitted through HTTPS is encrypted by SSL, and its main functions can be divided into two types:
1. Establish an information security channel to ensure the security of data transmission.
2. Confirm the authenticity of the website. Any website that uses https can view the real information of the website after authentication by clicking the lock sign in the address bar of the browser, and can also query through the security signature issued by the CA organization.
Now more and more websites and applications are developing towards HTTPS. For example, Chrome 56 launched by Google in June 20 17 shows the risk warning of URL links that are not encrypted with HTTPS in a prominent position in the address bar, which reminds users that "this webpage is not safe".
The difference between HTTP and TCP/IP
TCP/IP protocol is a transport layer protocol, which mainly solves how to transmit data in the network, while HTTP is an application layer protocol, which mainly solves how to encapsulate data. Regarding the relationship between TCP/IP and HTTP protocol, the network has an easy-to-understand introduction: "When we transmit data, we can only use TCP/IP protocol (transport layer), but in that case, if there is no application layer, we can't identify the data content. If we want the transmitted data to be meaningful, we must use the application layer protocol. There are many application layer protocols, such as HTTP, FTP, TELNET, etc. And we can also define our own application layer protocols. The WEB uses HTTP protocol as the application layer protocol to encapsulate HTTP text information, and then uses TCP/IP as the transport layer protocol to send it to the network. "