HTTP Status Code, statuscode

Source: Internet
Author: User

HTTP Status Code, statuscode

The HTTP Status Code reflects the returned values of a webpage. For example, if a webpage can be opened normally, the return status code is 200. These status codes are not displayed when we browse the webpage normally, you must call a dedicated query tool to view the status code returned by the server by using Firefox as an example.

In addition to determining whether a webpage can be opened normally, the HTTP Status Code also has other purposes. For example, the 301/302 redirection frequently used in SEO is usually used to redirect a domain name without www to a domain name with www, to achieve a perfect web site opening experience, another scenario is that after the website is revised, the original web page path weight should be transferred to the new web page path, and 301 redirection is often used.

When these redirects are set, the HTTO status code is used to determine whether the settings are correct. Each HTTP Status Code represents a different meaning. Below are some common status codes: 200-the server successfully returns the webpage 404-the requested webpage does not exist. 503-the service is unavailable.

The following is an explanation of the status of all HTTP requests:

1xx (temporary response): Status Code indicating a temporary response and requiring the requester to continue the operation.

  • 100 The Continue (Continue) requestor shall Continue to make the request. The server returns this code, indicating that the first part of the request has been received and is waiting for the remaining part.

2xx (successful): indicates that the request status code is successfully processed.

  • 200 OK (successful) the server has successfully processed the request. Generally, this indicates that the server provides the requested webpage.
  • 201 Created (Created) request has been implemented, and a new resource has been Created based on the request needs, and its URI has been returned with the Location header information.
  • 202 The Accepted (Accepted) server has Accepted the request but has not yet processed it.

3xx (redirection): indicates that further operations are required to complete the request. These status codes are usually used for redirection.

  • 301 Moved Permanently (Permanently Moved) the browser Permanently redirects to another URL specified in the Location message header. In the future, the customer should replace the original URL with the new URL.
  • 302 Move temporarily the browser temporarily redirects to another URL specified in the Location message header. The customer shall restore the use of the original URL in subsequent requests.
  • 304 NotModified -- this status code prompts the browser to use the cached copy of the requested resource. The server uses the If-Modified-Since and If-None-Match message headers to determine whether the client has the latest version of resources.

4xx (request error): These status codes indicate that the request may be faulty, which hinders server processing.

  • 400 the Bad Request server does not understand the Request syntax. This status code may be encountered when a request is modified in an invalid way (for example, a space character is inserted in the URL.
  • 401 Unauthorized (Unauthorized) requests require authentication. The server may return this response for webpages that require logon.
  • 403 Forbidden (Forbidden) The server rejects the request.
  • 404 Not Found (Not Found) request failed. The requested resources were Not Found on the server.
  • 405 Method Not Allowed (Method disabled) This Status Code indicates that the specified URL does Not support the Method used in the request
  • 413 Request Entity Too Large (the Request Entity is Too Large) The server cannot process the Request because the Request Entity is Too Large and exceeds the server's processing capability.
  • 414 the URL in the Request URI Too Long (the requested URI is Too Long) is Too Long and cannot be processed by the server.

5xx (server error): indicates an internal error occurred when the server tried to process the request. These errors may be server errors rather than request errors.

  • 500 Internal Server Error (Internal Server Error) This Status Code indicates that the Server encountered an Error while executing the request. This status code is usually received when an unexpected input is submitted and an error cannot be processed during application processing. You should carefully check all the content of the server response to learn details about the error nature.
  • 503 Service Unavailable (Service Unavailable) The server cannot process requests because of temporary server maintenance or overload. This situation is temporary and will be restored after a period of time.

It is worth mentioning that the HTTP status code of the webpage also plays an important role in testing the integrity of the webpage. For example, the image path called by the style sheet does not exist, the corresponding 404 value is displayed in the developer tool, that is, the requested image cannot be found. In this case, you can make targeted modifications. In addition to the HTTP status code, the developer tool can also view the webpage response time to find out which slow webpage loading speeds and provide many functions.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.