HTTP Status Codes (100 – 500)
HTTP Status Codes are a set of standardized responses sent by a server in response to a client’s request, typically from a browser to a web server. These codes help indicate the outcome of the request and can provide information about whether it was successful or if errors occurred.
Here’s an overview of the different classes of HTTP Status Codes:
1xx: Informational Responses
- 100 Continue: The server acknowledges the initial part of the request and is waiting for the rest.
- 101 Switching Protocols: The server agrees to switch protocols as requested by the client.
- 102 Processing: The server has received and is processing the request, but no response is available yet.
- 103 Early Hints: Used to provide early information to help preload resources.
2xx: Successful Responses
- 200 OK: The request was successful, and the result depends on the method used (GET, POST, etc.).
- 201 Created: The request was successful, and a new resource was created.
- 202 Accepted: The request has been accepted for processing, but it’s not yet completed.
- 203 Non-Authoritative Information: The request was successful, but the information may come from a third party.
- 204 No Content: The request was successful, but no content is returned.
- 205 Reset Content: Instructs the client to reset the document that sent the request.
- 206 Partial Content: Only a portion of the resource is delivered, as requested via the
Range
header.
3xx: Redirection Messages
- 300 Multiple Choices: Multiple options for the requested resource exist, and the client should choose one.
- 301 Moved Permanently: The resource has been permanently moved to a new URL.
- 302 Found: The resource is temporarily located at a different URL.
- 303 See Other: The server directs the client to another URL to retrieve the requested resource.
- 304 Not Modified: The requested resource has not been modified and the client can use the cached version.
- 307 Temporary Redirect: Temporary redirect; the client should repeat the request at another URL using the same method.
- 308 Permanent Redirect: Permanent redirect; the resource has been moved permanently to another URL.
4xx: Client Error Responses
- 400 Bad Request: The server could not understand the request due to malformed syntax.
- 401 Unauthorized: The client must authenticate itself to get the requested response.
- 403 Forbidden: The client is not allowed to access the resource, even though it is authenticated.
- 404 Not Found: The requested resource could not be found.
- 405 Method Not Allowed: The request method is not allowed for the requested resource.
- 408 Request Timeout: The server timed out waiting for the request.
- 409 Conflict: The request conflicts with the current state of the server.
- 429 Too Many Requests: The user has sent too many requests in a given period.
5xx: Server Error Responses
- 500 Internal Server Error: The server encountered an error and could not complete the request.
- 501 Not Implemented: The server does not support the functionality required to fulfill the request.
- 502 Bad Gateway: The server received an invalid response from an upstream server.
- 503 Service Unavailable: The server is not ready to handle the request, often due to maintenance or overload.
- 504 Gateway Timeout: The server, acting as a gateway, did not receive a timely response from the upstream server.
- 505 HTTP Version Not Supported: The server does not support the HTTP protocol version used in the request.
For more detailed information, you can refer to:
Explore More: 5 Reasons to Use React Memo to Supercharge Performance and Boost Page Speed, 10 JavaScript Tricks and Practices You Need To Know, 5 Steps for Building a Powerful React App from Scratch: Set up Webpack, Webpack Dev Server, and Babel, Ultimate Next.js Setup: 7 Optimized Tips for Performance, Caching, and Modern Web Development, Next.js Project Structure: Optimize for Scalability and Maintenance in Next.js 14