In-depth understanding of HTTP (i)

Source: Internet
Author: User

First, what is the HTTP protocol?
The HTTP protocol refers to the abbreviation for the Hyper Text Transfer Protocol (Hypertext Transfer Protocol). It is used to transfer the data from the WWW server to the local browser's delivery protocol.

HTTP is an application-layer protocol that consists of a request and a response.

HTTP is a stateless protocol. The so-called stateless protocol means that the first connection is not related to the second connection. In the case of life: Suppose you go to a strange company to find someone, but the security does not know you, let you register and put you in. The second time, you go to that company again, when looking for someone, you still need to register. There is no relationship between the two and the same time.

The HTTP protocol usually works on top of the TCP protocol. However, the HTTP protocol has security implications, in order to solve the security problem of HTTP, HTTP is also hosted on the TSL or SSL protocol layer, this time, we call HTTPS.

The default port for HTTP is 80. The default port for HTTPS is 443.

The HTTP protocol is always a client sending request. Such as:

Second, the workflow of HTTP.

An HTTP operation is called a transaction. The workflow is as follows:

1. The client and the server need to establish a connection. For example, if you click a hyperlink, the HTTP work begins.

2. After the connection is established, the client sends a request to the server. The requested format is: Uniform Resource Locator (URL), protocol version number, and back MIME information (MIME information includes server information, client information, and possible content).

3. When the server receives the request, it gives the corresponding response information in the form of a status line (the information for the status line includes the protocol version number, a successful or incorrect code, followed by MIME information (MIME information includes server information, client information, and possible content). )。

4. The client receives the information returned from the server. The information is parsed by the browser engine and displayed on the user's display. Finally, the connection to the client and the server is disconnected.

Such as:

Third, the HTTP protocol to the operation of resources

In-depth understanding of HTTP (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.