How does HTTP 302 work? I would like to know the internals
You mean how do browsers handle it? The server sends a 302
code along with a Location
header, and the browser requests the new URI specified by the Location
header instead.
Unlike 301 (Moved Permanently)
, the browser continues to use the original URI to do requests, in case the 302
code goes away