306 Switch Proxy
No longer used. Originally meant subsequent requests should use the specified proxy.
Usually happens because:
- ☑ Legacy HTTP draft specification testing
🔍 Quick Checklist:
Meaning
The HTTP 306 Switch Proxy status code is an unused legacy status. It was originally defined to instruct clients that subsequent requests should be sent using the proxy specified in the response. It is now reserved for protocol extensions.
Root Causes
- Legacy HTTP draft specification testing protocols.
| Cause | Frequency |
|---|---|
| Legacy HTTP draft specification testing | ⭐⭐⭐⭐⭐ |
Common Mistakes
- Attempting to use 306 for modern client redirection (which will fail in all modern clients).
How to Fix
Framework-Specific Examples
Returning reserved status 306.
app.get('/unused', (req, res) => {
res.status(306).end();
});Server Configuration Examples
Nginx ignores status 306.
# 306 is not configuredPrevention
- Ensure web routers never return status 306.
Frequently Asked Questions (FAQ)
Q: Is HTTP 306 Switch Proxy obsolete?
Yes. It was defined in early HTTP specifications but has been omitted from RFC 7231 and is now reserved as an unused placeholder.
Q: What was the original purpose of 306?
To allow a server to tell the browser client to change proxy configurations for subsequent connections.
Q: Can I use 306 in my API?
No. No HTTP client library, browser, or proxy supports 306, and using it will cause requests to fail.
Q: Does 306 have a name in the HTTP standard?
It is officially named 'Unused' or 'Switch Proxy' in legacy drafts, and is kept reserved to prevent namespace collision.