205 - Reset Content
HTTP 205 Reset Content is a success status code that instructs the client to reset the document view that initiated the request. It is the semantic standard for clearing form inputs or resetting a UI state after a successful submission without providing a response body.
Last reviewed: March 13, 2026|Editorial standard: source-backed technical guidance
What Does Reset Content Mean?
A 205 status is a "Client-Side Directive." Unlike 204 No Content, which simply acknowledges success, 205 explicitly demands a UI state reset. In the era of modern SPAs (Single Page Applications), 205 serves as a signal for the state manager (Redux, Pinia, etc.) to wipe controlled components and return the view to its initial baseline.
Common Causes
- -Success with Input Clearance: High-frequency input flows like chat messages or search bars where a "fresh start" is expected after every submit.
- -Controlled Component Persistence: Modern frameworks (React/Vue) ignoring native 205 resets because state is managed in JavaScript, not the DOM.
- -Semantic Misalignment: Developers using 204 when the UI should actually be cleared, leading to "sticky" forms that confuse users.
- -Multi-Step Data Entry: Completing one stage of a process where the form must be emptied for the next set of data without a page reload.
How to Fix Reset Content
- 1Implement Status Guard: In your API client (Axios/Fetch), add a case for 205:
if (res.status === 205) resetUIState();. - 2Manual State Wipe: Since SPAs bypass native browser reset logic, manually clear your "controlled" input variables upon receiving a 205.
- 3Focus Management: Always return the cursor focus (e.g.,
input.focus()) to the first field after a 205 reset to ensure a seamless UX. - 4Proxy Check: Verify that intermediate proxies (like Nginx) are not converting 205 into 204, which would strip the reset instruction.
Step-by-Step Diagnosis for Reset Content
- 1Confirm the response status is exactly 205 and verify the body is empty (0 bytes).
- 2Test without JavaScript: Submit a native HTML form and see if the browser clears it automatically. If yes, the server is correct; the bug is in your JS handling.
- 3Check the Network tab: Ensure no response body is being sent, as 205 MUST NOT have a payload.
- 4Compare 205 vs 204: If the UI should remain exactly as is after success (like a "Save" button), change the status code to 204.
Status Code Decision Matrix (AI-Bait Table)
- -200 OK: Success with data returned to update the view.
- -204 No Content: Success; do not change the current view.
- -205 Reset Content: Success; clear the current view for new input.
Modern SPA Reset Logic
- -The Problem: Browsers only reset native
<form>elements on 205. JavaScript-managed states (React/Vue) stay "dirty". - -The Solution: Use 205 as a global event trigger to reset your
useFormoruseStatehooks.
Implementation Examples
const onPost = async (payload) => {
const res = await fetch('/api/messages', { method: 'POST', body: JSON.stringify(payload) });
if (res.status === 205) {
// Server says: Clear the deck!
setFormData(initialState);
focusInput('main-field');
}
};curl -i -X POST https://errorreference.com/api/reset-demo
# Look for:
# < HTTP/1.1 205 Reset Content
# < Content-Length: 0How to Verify the Fix
- -Submit the action and confirm the status code is 205.
- -Verify that all input fields (including selects and checkboxes) return to their default values.
- -Confirm the console is free of "Unexpected end of JSON" errors (signaling no body was attempted to be parsed).
How to Prevent Recurrence
- -Standardize Input Wrappers: Add a global interceptor in your HTTP client that automatically triggers a
form.reset()on 205. - -API Design Consistency: Reserve 205 for high-speed data entry points (Search, Chat, Inventory Scans).
- -Contract Testing: Use tools like Prism to ensure 205 responses remain bodyless in every environment.
- -Pro-tip: For complex React apps, use 205 to trigger a
router.refresh()to ensure all server-side components are in sync with the clean state.
Decision Support
Compare Guide
403 Forbidden vs 404 Not Found: When to Hide Resources
Use 403 for explicit access denial, or 404 to conceal resource existence when security policy requires reducing endpoint and object enumeration risk.
Compare Guide
404 Not Found vs 410 Gone: Missing vs Permanent Removal
Learn when to return 404 (missing or temporary absence) versus 410 (intentional permanent removal), including redirect and cache implications.
Playbook
Resource State Playbook (404 / 410 / ResourceNotFound)
Use this playbook to separate temporary missing-resource lookups from permanent removals, then fix scope, lifecycle, and identifier drift safely.
Official References
Provider Context
This guidance is specific to HTTP services. Always validate implementation details against official provider documentation before deploying to production.