HTTP protocol Status Code

Source: Internet
Author: User
Tags 303 status code error status code http authentication

The common status code is not many, about 14 kinds.

The 1** class status code is called the information state, indicating that the information is being processed.

The 2** class status code is called the Success status code, which indicates that the request is completed normally.

The 3** class status code, called the redirection status code, indicates that the client needs additional operations, such as jumps. REDIRECT)

The 4** class status code is called an error status code, which is usually caused by a client error.

The 5** class state, called the server error status code, is usually caused by a service-side error.

Summary: The status code is divided into client error status code, server error status code, success status code, redirection status code and so on.

First, 2** type status code

1 OK indicates that the request sent from the client is handled correctly by the server and the request has been sent back.

2, 204 no Content request has been successful, but did not return any results (entity). Typically, the use of the PHP Die () exit () function throws a 204 status code.

3, 206 Partial Content range request status code.

A range request is something. Look, I know.

Some parts of the beauty graph are not loaded complete, actually the Internet loading picture is used for the range request. A picture may have 1024k, once loaded, the page rendering speed will be very slow, the expression will be relatively poor. After executing an asynchronous range request, each time you load a 256k picture and then render it in turn, the loading speed will be significantly faster.

The above 206 is worth the request of the HTTP request for a range of requests, only a subset of the resources.

Second, 3** status code

1, 301 Status Code Moved permanently indicates that the page resource you requested is now transferred and you need to go to a new location to find the page. This is redirect, the server's response header will have the Location field value to prompt.

2, 302 Status Code (Found) and 301 difference. Indicates that the page resource you requested is now transferred, and you have to go to a new place to find it. But the new place is not fixed, maybe a few days to change. The user is not prompted to save the bookmark, prompting the user to jump.

3, 303 status code. See other. The page you requested contains the address where you want to get the resource. For example, you go to the doorman to pick up the courier, to the doorman, Grandpa said the courier has been handed over to the front office. This process returns a 303 status code.

4.304 Not Modified This status code indicates that the server side allows requests to access resources, but does not meet the conditions, when the client sends a request with a condition. 304 The status code return is a body part that does not contain any responses. 304 is divided in the 3XX category, but there is no difference between redirection and redirection.

5, 307 temporary Redirect temporary redirection.

Three: 4** client error.

1. Bad Request message syntax error.

2, 401 unauthorized need to pass HTTP authentication (BASIC or Digest).

3, 403 Forbidden directory, file permissions error will be reported this status code.

4, 404 There is no such resource on the server, the general situation is the path error.

Four: 5** server error.

1, Internal Server error service side errors, there may be a Web application error.

2, 503 Serveice unavailable server overload operation.

Reprinted from: http://www.cnblogs.com/roverliang/p/5209414.html

HTTP protocol Status Code

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.