HTTP protocol Notes

Source: Internet
Author: User

Several concepts of the HTTP protocol:

1. Connection (Connection): A channel that transmits data between the browser and the server. The general request is closed, HTTP is not maintained, the connection is not maintained, and the processing speed is reduced (because the connection is slow), keeping the connection slows down the number of client requests processed by the server and does not keep the connection server from processing more requests.

2. Request: The browser sends the message "I want to * * *" to the server, including the type of the request, the requested data, the browser's information (language, browser version, etc.)

3. Response (Response): The server returns data to the browser request, including whether it is successful, error code, etc.

HTTP protocol message:

1. Request

  • get/http/1.1 means to request the home page with a GET method to the server, using the http/1.1 protocol
  • User-agent is the browser version information. Through this information can be read browser is IE or Firefox, supported plug-ins,. NET version, etc.
  • Referer: Source page, owning page

2. Response

  • Response code: "200" indicates a successful access, "302" means a temporary transfer for redirection, Response.Redirect () will allow the browser to request a redirect address again, the redirected request is get mode; "404" means not found

3. Content-type:text/html;charset=utf-8 indicates the type of return data

4, the server through the Content-type to tell the client the type of data response, so that the browser based on the type of return data to do different processing, if the type of picture is displayed, if the text type is directly displayed content, if the HTML type of the browser display content. Commonly used content-type:text/html, Image/gif, Image/jpeg, Text/plain (for normal text), Text/javascript

HTTP protocol Notes

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.