How does HTTP 302 work?

GilliVilla picture GilliVilla · Jul 28, 2010 · Viewed 34.8k times · Source

How does HTTP 302 work? I would like to know the internals

Answer

Michael Mrozek picture Michael Mrozek · Jul 28, 2010

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