Home  >  Article  >  Web Front-end  >  What are the error codes of ajax?

What are the error codes of ajax?

青灯夜游
青灯夜游Original
2022-01-19 14:07:253796browse

ajax error codes are: 400 (bad request), 401 (unauthorized), 403, 404, 405, 406, 407, 408 (request timeout), 409, 410, 411, 412, 500 (server Internal error), 502 (Bad Gateway), 503 (Server Unavailable), 504 (Gateway Timeout), etc.

What are the error codes of ajax?

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

The error codes of ajax are

4xx (request error)

These status codes represent The request may be in error, hindering the server's processing

 400 (Bad Request): The server does not understand the syntax of the request;

 401 (Unauthorized): The request requires authentication; for requests after login page, the server may return a response;

 403 (Forbidden): The server refuses the request. If you see this status code when Googlebot tries to crawl a valid page on your site (you can see this on the Web Crawl page under Google Webmaster Tools Diagnostics), it's possible that the server's host has denied Googlebot access;

 404 (Not Found):

405 (Method Disabled): Disable the method specified in the request;

406 (Not Accepted): Unable to respond to the request using the request content characteristics Web page;

407 (Proxy authorization required): This status code is similar to 401 (Unauthorized), but specifies that the requester should authorize Use a proxy. If the server returns this response, it also indicates that the requester should use a proxy;

 408 (Request Timeout): A timeout occurs while the server is waiting for the request;

 409 (Conflict): Occurs when the server completes the request conflict. The server MUST include information about the conflict in the response. The server may return this code when responding to a PUT request that conflicts with a previous request, along with a list of differences between the two requests;

 410 (Deleted): If the requested resource has been permanently deleted, the server will Return this response. This code is similar to the 404 (Not Found) code, but is sometimes used in place of the 404 code when the resource previously existed but now does not. If the resource has been moved permanently, you should use 301 to specify the new location of the resource;

 411 (valid length required): The server does not accept requests without a valid content-length header field;

 412 (Precondition not met): The server does not meet one of the preconditions set by the requester in the request;

413 (Request entity is too large): The server cannot process the request because the request entity is too large and exceeds the server's size. Processing capability;

414 (requested url too long): The requested URI (usually a URL) is too long and the server cannot handle it;

415 (unsupported media type) : The requested format is not supported by the requested page;

 416 (The requested range does not meet the requirements): If the page cannot provide the requested range, the server will return this status code;

 417 ( Expectations not met): The server did not meet the requirements of the "Expectations" request header field;

 423 (Lock Error)

5XX (Server Error)

These status codes indicate that an internal error occurred while the server was processing the request. These errors may be errors on the server itself, rather than request errors;

500 (server internal error): The server encountered an error and was unable to complete the request;

501 (not yet implemented): The server did not Have the function to complete the request. For example, this code may be returned when the server does not recognize the request method;

502 (Bad Gateway): The server, acting as a gateway or proxy, received an invalid response from the upstream server;

503 (Server Unavailable) Used): The server is currently unavailable (due to overload or downtime for maintenance). Usually, this is only a temporary state

 504 (Gateway Timeout): The server acts as a gateway or proxy, but the request is not received from the upstream server in time;

 505 (http version is not supported): Server The HTTP protocol version used in the request is not supported

[Related tutorial recommendations: AJAX video tutorial]

The above is the detailed content of What are the error codes of ajax?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is ajax called?Next article:What is ajax called?