Navigation
What does Status Code 302 Found mean?
Status code 302 Found is one of the classes of 3xx(redirection) response code that indicates the target resource or the resource requested resides under a different URL(Uniform Resource Locator).
The URL is given by the Location Header. A client that receives a status code 302 Found Response code should continue using the original URL for future requests since the location might be changed in the future.
The location header field should be generated by the server in the response that contains a URI(Uniform Resource Indicator) for the different URI. Similarly, the Location field value may be used by the user agent for automatic redirection.
Location Header Field
In some responses, the Location header field is used to refer to a particular resource in connection to the response. The type of relationship is defined by the combination method of the request and status code semantics.
Location = URI-reference
It only provides a meaning when used with a 3xx (redirection) or 201 (created) status response.
Syntax
Location:<url> |
Example
Location:/index.html |
Status
302 Found |
Specifications
Browser compatibility
Full Support
Read more: HTTP Status Code 202 Accepted
302 CODE REFERENCES
Rails HTTP Status Symbol | : found |
Go HTTP Status Constant | http.StatusFound |
Symfony HTTP Status Constant | Response::HTTP_FOUND |
Python2 HTTP Status Constant | httplib.FOUND |
Python3+ HTTP Status Constant | HTTP.client.FOUND |
Python3.5+ HTTP Status Constant | HTTP.HTTPStatus.FOUND |
FAQs
What does Status Code 302 Found mean?
Status Code 302 Found is one of the classes of 3xx(redirection) response code that indicates the target resource or the resource requested resides under a different URL(Uniform Resource Locator).
What is the use of the Location Header field?
In some responses, the Location header field is used to refer to a particular resource in connection to the response. It only provides a meaning when used with a 3xx (redirection) or 201 (created) status response.
Example:
Location:/index.html
What does the 302 and 301 status code suggest?
A 302 redirect means that the page was temporarily moved, while a 301 means that it was permanently moved.
Conclusion
I hope this article was able to help you with your doubts and queries related to the HTTP status code 302(Found). Still, if there are any queries related to this topic, feel free to ask in the comment section, we would be happy to assist you. Thank you.
Saurabh Chalise