HTTP Status Codes and Headers
The request status of the Ajax object is equivalent to the HTTP status of the file that is being requested. HTTP status codes represent the response from the server based on the status of the file that is being requested. There are five categories of status codes available for the HTTP request and the XHR:
Informational: 1xx
Successful: 2xx
Redirection: 3xx
Client Error: 4xx
Server Error: 5xx
When a status code is received through the Web, it is represented as a number, such as when you try to go to a website and get a 404 error. This is not an arbitrary number; it is representative of the file status and in this case represents the “File Not Found” response. All status codes must be handled appropriately by the server ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access