How HTTP Works
2xx · Success
< HTTP/1.1 205 Reset Content

205 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.

Reviewed 2 min readintermediate3 sourcesTry itMarkdown
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
On this page

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 (or Transfer-Encoding with 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), so response.body is null and response.text() resolves to an empty string. response.ok is true.
  • Mocking trap. new Response('ok', { status: 205 }) throws TypeError: Failed to construct 'Response': Response with null body status cannot have body in Chromium, so test mocks must use new 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.

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

  1. MDN Web Docs: 205 Reset Contentdeveloper.mozilla.org
  2. RFC 9110 Section 15.3.6: 205 Reset Contentrfc-editor.org
  3. Fetch Standard: null body statusfetch.spec.whatwg.org

Keep going

Browse /search