< HTTP/1.1 205 Reset Content205 Reset Content: What It Does and Browser Support
205 Reset Content tells the client to reset the view that sent the request, like clearing a form. Learn its rules, fetch behaviour and why it is rarely used.
- Cacheable
- Only with explicit freshness
- Client action
- Reset the form or view
- Usually sent by
- Origin app
- Spec
- RFC 9110 §15.3.6
- Often confused with
- 204
TL;DR: 205 Reset Content means “done, there is no body, and the client should reset the view that sent this request” (clear the form). It is defined in RFC 9110 but almost never used, and browsers do not reliably act on it, so reset the form in your own JavaScript.
What it means
It is the sibling of 204 No Content. The difference is the instruction to the user agent: with 204 keep the view as is, with 205 return it to its pre-interaction state. The intended use is a data-entry form that posts to a server and, on success, is cleared so the user can enter the next record.
POST /entries HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
name=Alice&amount=40
HTTP/1.1 205 Reset Content
Content-Length: 0
Rules from RFC 9110 §15.3.6:
- The server must not generate content in a 205. Sending
Content-Length: 0(orTransfer-Encodingwith an empty last chunk) tells the client the message ends, so it does not hang waiting. - A client should reset the view without reloading.
- 205 is not cacheable by default.
What happens in practice
- Browsers. Behaviour for form submissions differs by browser and by how the request was made, and a form POST that returns 205 often just leaves the page where it was. Do not build features on it.
- fetch and XHR. Both pass the status through. In
fetch, 205 is one of the Fetch Standard’s null body statuses (101, 103, 204, 205, 304), soresponse.bodyisnullandresponse.text()resolves to an empty string.response.okistrue. - Mocking trap.
new Response('ok', { status: 205 })throwsTypeError: Failed to construct 'Response': Response with null body status cannot have bodyin Chromium, so test mocks must usenew Response(null, { status: 205 }). - Proxies. Some intermediaries mishandle bodies on 1xx/204/205 and add
Content-Length/chunked framing that confuses clients. Make sure your server really sends none.
Because the client does the reset anyway if you tell it to, most APIs return 204 or 201 and let the frontend clear its state:
const res = await fetch('/entries', { method: 'POST', body: new FormData(form) })
if (res.ok) form.reset() // works for 200, 201, 204, 205 alike
Try it with curl
Submit a form and look for a body-less 205. The server must send no content with this status, so expect Content-Length: 0.
curl -i -X POST https://example.com/comments -d 'text=hello'
Example output (illustrative, not captured from a real server):
HTTP/1.1 205 Reset Content
Content-Length: 0
curl just prints the status. Whether a browser actually resets the form is client-specific, so do not rely on 205 for UI behavior without testing.
Related
Frequently asked questions
What does 205 Reset Content mean?
The server processed the request and has no content to return, and the client should reset the document view that sent the request, for instance by clearing a form so the user can enter more data.
What is the difference between 204 and 205?
204 No Content says the request succeeded and the client should leave the current view as it is. 205 says it succeeded and the view should be reset to its initial state. Both have no body.
Can a 205 response have a body?
No. RFC 9110 says a server must not generate content in a 205 response, and must send Content-Length: 0 or otherwise indicate an empty body, so that the client does not wait for data.
Do browsers actually reset forms on 205?
Not reliably. Browsers handle 205 as a response with no content, and form reset behaviour is inconsistent across them, so rely on your JavaScript to reset the form after a successful fetch rather than on the status code.
Does fetch accept a 205 response?
Yes when received from a server. The Fetch Standard lists 205 among null body statuses, so response.body is null. Constructing new Response("text", { status: 205 }) throws a TypeError, which matters when mocking in tests.
Sources
Related
202 Accepted
The request was accepted for processing but not completed yet. Learn when to use 202 for asynchronous operations.
203 Non-Authoritative Information
203 means a proxy modified the origin response before passing it on. Learn when it is sent, how it differs from 200, caching rules and what clients should do.
204 No Content
The request succeeded with no response body. Learn when to use 204 No Content for successful operations that don't return data.
207 Multi-Status: WebDAV Per-Resource Results
207 Multi-Status carries an XML body with a separate status per resource. See a PROPFIND example, how to parse it, and why the top-level code is not the result.