303 See Other
Redirection - Follow with GET to different URI
HTTP 303 See Other
What It Means
The HTTP 303 See Other status code indicates that the response to the request can be found at a different URI. The client should use GET to retrieve the resource at the new location, regardless of the original request method.
The PRG Pattern
303 is essential for the Post/Redirect/Get (PRG) pattern, which prevents duplicate form submissions:
# 1. User submits form
POST /orders HTTP/1.1
Content-Type: application/x-www-form-urlencoded
product=widget&quantity=5
# 2. Server creates order and redirects
HTTP/1.1 303 See Other
Location: /orders/12345
# 3. Browser follows redirect with GET
GET /orders/12345 HTTP/1.1
# 4. User sees confirmation page
HTTP/1.1 200 OK
Content-Type: text/html
<h1>Order #12345 confirmed!</h1>
Why PRG Matters
- Prevents double-submit: Refreshing the page won't resubmit the form
- Clean URLs: User's address bar shows the result page, not the action
- Bookmarkable: The confirmation page can be bookmarked
- Back button works: No "resubmit form?" warnings
303 vs Other Redirects
| Code | Method | Use Case |
|---|---|---|
| 301 | Preserve | Permanent URL change |
| 302 | Usually GET* | Temporary redirect (ambiguous) |
| 303 | Always GET | After POST (PRG pattern) |
| 307 | Preserve | Temporary, keep method |
*302 behavior varies by browser, 303 is explicit
Key Difference from 307
303 explicitly changes the method to GET, while 307 preserves the original method. Use 303 when redirecting after a POST to show a result page; use 307 when temporarily moving an API endpoint that should keep the same method.