Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does the value of status in Ajax xmlHttpRequest mean

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Ajax xmlHttpRequest status value is what meaning, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

The status of the xmlHttpRequest object represents the status of the current http request and is a long integer data, so let's introduce what it means.

Http request status and its meaning table

1xx-Information Tip

100-the initial request has been accepted and the customer should continue to send the rest of the request. (HTTP 1.1 New)

101-the server will convert to another protocol in compliance with the customer's request. (HTTP 1.1 New)

2xx-successful

200-OK is fine, and the response documents for GET and POST requests are followed.

The document has been created by the Created server, and its URL is given by the Location header.

202-Accepted has accepted the request, but the processing has not been completed.

The 203-Non-Authoritative Information document has been returned normally, but some response headers may be incorrect because you are using a copy of the document, non-authoritative information (HTTP 1.1 new).

There are no new documents in No Content, and browsers should continue to display the original documents. This status code is useful if the user refreshes the page regularly and Servlet can determine that the user document is new enough.

There is no new content in 205-Reset Content, but the browser should reset what it displays. Used to force browsers to clear form input (HTTP 1.1 new).

The Partial Content client sends a GET request with a Range header, and the server completes it (HTTP 1.1 new).

3xx-redirect

Documents requested by Multiple Choices customers can be found in multiple locations, which are already listed in the returned document. If the server wants to make a priority, it should be indicated in the Location response header.

The document requested by the Moved Permanently customer is elsewhere, the new URL is given in the Location header, and the browser should automatically access the new URL.

302-Found is similar to 301, but the new URL should be seen as a temporary replacement, not permanent. Notice that the corresponding status information in HTTP1.0 is "Moved Temporatily". When this status code appears, the browser can automatically access the new URL, so it is a very useful status code. Note that this status code is sometimes used interchangeably with 301. For example, if the browser mistakenly requests http://host/~user (missing the trailing slash), some servers return 301 and others return 302. Strictly speaking, we can only assume that the browser will redirect automatically only if the original request is GET. See 307.

303-See Other is similar to 301 See Other 302, except that if the original request is the redirect target document specified by the POST,Location header, it should be extracted through GET (HTTP 1.1 new).

The Not Modified client has buffered documents and issues a conditional request (typically providing an If-Modified-Since header to indicate that the customer only wants to update the document on a specified date). The server tells the customer that the original buffered document can continue to be used.

Documents requested by Use Proxy customers should be extracted through the proxy server specified in the Location header (HTTP 1.1 new).

307-Temporary Redirect is the same as 302 (Found). Many browsers will mistakenly redirect in response to a 302 reply, even if the original request is POST, even if it can only be redirected when the response to the POST request is 303. For this reason, HTTP 1.1has added 307s to make it clear that there are several status codes: when a 303reply occurs, the browser can follow the redirected GET and POST requests; if it is a 307reply, the browser can only follow the redirection of the GET request. (HTTP 1.1 New)

4xx-client error

A syntax error occurred in the 400-Bad Request request.

401-Unauthorized access is denied and the customer attempts to access a password-protected page without authorization. A WWW-Authenticate header is included in the reply, and the browser displays the user name / password dialog box, and then issues the request again after filling in the appropriate Authorization header.

404-Not Found could not find the resource at the specified location. This is also a common response.

405-Method Not Allowed request methods (GET, POST, HEAD, DELETE, PUT, TRACE, etc.) are not applicable to the specified resources, and the HTTP predicate used to access this page is not allowed (methods are not allowed) (HTTP 1.1 new)

The resource specified by Not Acceptable has been found, but its MIME type is not compatible with that specified by the customer in the Accpet header, and the client browser does not accept the MIME type of the requested page (HTTP 1.1 new).

407-Proxy Authentication Required requires proxy authentication, similar to 401, indicating that the customer must first be authorized by the proxy server. (HTTP 1.1 New)

408-Request Timeout No request has been made by the customer during the waiting time for the server license. The customer can repeat the same request later. (HTTP 1.1 New)

409-Conflict is usually associated with PUT requests. The request cannot succeed because the request conflicts with the current state of the resource. (HTTP 1.1 New)

The document requested by 410-Gone is no longer available, and the server does not know which address to redirect to. It differs from 404 in that returning 407 indicates that the document has permanently left the specified location, while 404 indicates that the document is not available for unknown reasons. (HTTP 1.1 New)

411-the Length Required server cannot process requests unless the customer sends a Content-Length header. (HTTP 1.1 New)

Some of the prerequisites specified in the Precondition Failed request header failed (HTTP 1.1 new).

413-the size of the Request Entity Too Large target document exceeds what the server is currently willing to process. If the server thinks it can process the request later, it should provide a Retry-After header (HTTP 1.1 new).

414-Request URI Too Long URI is too long (HTTP 1.1 new).

415-unsupported media type.

416-the Requested Range Not Satisfiable server cannot satisfy the Range header specified by the customer in the request. (HTTP 1.1 New)

417-execution failed.

423-Lock error.

5xx-Server error

The Internal Server Error server encountered an unexpected situation and was unable to complete the customer's request.

501-the Not Implemented server does not support the functionality required to implement the request, and the header value specifies the unimplemented configuration.

When the Bad Gateway server acts as a gateway or proxy, it accesses the next server in order to complete the request, but the server returns an illegal reply. Also said that the Web server received an invalid response when it was used as a gateway or proxy server.

503-the Service Unavailable service is not available and the server cannot reply due to maintenance or overload. For example, Servlet might return 503 if the database connection pool is full. The server can provide a Retry-After header when it returns 503. This error code is specific to IIS 6. 0.

504-the Gateway Timeout gateway timed out and was used by the server as the proxy or gateway, indicating that the reply could not be obtained from the remote server in a timely manner. (HTTP 1.1 new).

The HTTP Version Not Supported server does not support the HTTP version specified in the request. (HTTP 1.1 new).

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report