The main features of HTTP protocol and the meanings of different status codes

Source: Internet
Author: User
Tags string format browser cache
The main features of the HTTP protocol:

Main features: Simple fast, flexible, no connection (non-keep-alive), no State
1, each resource URI is fixed, want to access a resource, browser input URI can be.
2. Flexible: HTTP allows any type of data object to be transmitted, and the type being transmitted is marked by Content-type.
3, no connection: The meaning of no connection is to limit the processing of one request per connection. When the server finishes processing the customer's request and receives the customer's answer, the connection is disconnected. In this way, the transmission time can be saved.
4. Stateless: means that the protocol has no memory ability for transaction processing. Subsequent processing needs to be re-transmitted when the previous information is required.

"Supplemental" What is a URI? What is a URL? What's the difference?
Simple summary:
uri--Uniform Resource Identifiers
URL (Uniform Resource Locator): The Uniform Resource Locator is also sometimes referred to as the web address.
URL is a subset of URIs

HTTP method

POST: Transfer Entity content resources
Get: Get Resources
PUT: Updating resources
HEAD: Get message header
Delet: Deleting files

"Test Center: What is the difference between post and get?" "(Remember 3-5)

Get is harmless when the browser is rolled back, and post submits the request again.
Get generated URL address can be bookmark, and post is not available.
The GET request will be active by the browser cache, and post will not, unless manually set.
The GET request parameters are kept intact in the browser history, and the parameters in the post are not retained.
A GET request has a length limit for the parameters that are passed in the URL (2kb different browsers will also vary), and post does not.
For data types of parameters, get accepts only ASCII characters, while Post has no restrictions.
Get is less secure than post, because parameters are directly exposed to URLs, so they cannot be used to pass sensitive information.
The get parameter is passed through the URL and the post is placed in request body.
A GET request can only be URL-encoded-encodeuricomponent (), while post supports multiple encoding methods.

The format of the "supplemental" post data is the same as the query string format, and if you need to serialize the data for the form in the page and then send it to the server via XHR, you can use the Serialize () function to create the string, which is the form serialization

HTTP status Code

Need to remember some frequently encountered, other status code can view the HTTP status code document
1XX: Indicates the information, the request is being processed
2xx: Request a normal receive
206: "Partial Content" response: The client sends a GET request with a range request header, which indicates that it only needs a portion of the resource on the URL and the server has completed it. For example, when video audio plays a very large visual/audio address, it typically returns 206
3xx: redirect requires additional action to complete the request
301: Permanent redirection, the requested page has been transferred to the new URL
302: Temporary REDIRECT
304: Cache, the server tells the browser to use the cache directly, without requesting the server
4xx (client error)
400: Client syntax error
401: Request authorization failed
403: Request does not allow forbidden resource forbidden access
404: No file, query or URL
5xx (server-side error)
500: Server Unpredictable error
501: "Internal server Error" server side error occurred while executing the request, the server is not working properly
503: The server is currently unable to process client requests for temporary overloads and the machine
504: The server is not connected to
505: The server does not support or deny HTTP versions specified in the request header

Related Article

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: 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.