205 Reset Content
The HTTP205 Reset Contentsuccessful response status code indicates that the request has been successfully processed and the client should reset the document view.
This response is intended to support use cases where the user receives content that supports data entry, submits user-edited data in a request, and the content needs to be reset for the next entry.The instruction to "reset content" can mean clearing the contents of a form, resetting a canvas state, or refreshing a UI; the implementation depends on the client.
Note:In web applications that use the205 status, it's assumed that the client handles resetting content after a205 response.This is typically done via JavaScript, as resetting content such as forms after a205 response is not handled natively by browsers.
Note that the response must not include any content or theContent-Length header (browsers may reject responses that include content).The empty response may also be indicated using theTransfer-Encoding: chunked header with an empty chunk.
In this article
Status
205 Reset ContentExamples
>Resetting a form after receiving a205 Reset Content
The client in this example sends aPOST request to submit a form with the commentHello!:
POST /submit HTTP/1.1Host: example.comContent-Type: application/x-www-form-urlencodedContent-Length: 15comment=Hello!After successfully processing the form submission, the server responds with the following205 response, indicating that the client should reset the form.
HTTP/1.1 205 Reset ContentContent-Type: text/html; charset=utf-8Content-Length: 0Date: Wed, 26 Jun 2024 12:00:00 GMTSpecifications
| Specification |
|---|
| HTTP Semantics> # status.205> |