HTTP 205 Reset Content – Free, Online, Private
205 Reset Content means success, and the client should reset the view that sent the request.
What HTTP 205 means
205 tells the user agent to reset the document that caused the request. The usual picture is a form: the submission worked, and the form should be cleared so the user can enter the next record. The response itself has no body. It is not a general 'refresh the page' signal, and it is not widely implemented outside browsers.
205 Reset Content belongs to the 2xx successful class. Clients that only look at the class will group it with its neighbors. Clients that care about the exact code should use the narrower rule on this page, because the class is only the first digit.
When you see HTTP 205
When you see HTTP 205 Reset Content, stop on that exact status line. 205 Reset Content means success, and the client should reset the view that sent the request. The trace that usually produces it: A data-entry form was accepted and should be emptied for the next row. The 2xx successful class only tells you the first digit. A neighbor in that class is a different fault, and the fix on this page does not transfer to it.
Return 205 when a successful action should clear the form that submitted it. If you want the user to land on a different URL, send a redirect. If you want to return the saved object, send 200. Do not use 205 as a cache-bust.
How to fix HTTP 205
To fix HTTP 205, change the condition that made the server choose Reset Content. If you rendered a form, clear it. If you are an API client with no view, treat 205 like 204: success, no body. The action already succeeded. Retrying the submission can create a second record if the method was POST. Clear the form instead of resubmitting. If the log line is a different code, leave this page. The mix-up people make with 205 is this one: 204 is success with no body and no reset instruction. 303 is a redirect to another URL. 205 stays on the current document and clears it.
- A client ignored 205 and left the old values in the form, so the user double-submitted.
- An API returned 205 to a non-browser client that has no document to reset.
- A server sent a body with 205 and a proxy discarded the response as malformed.
An access log that only stores 205 is not enough to tell these apart. Keep the method, the path, and a request id. Do not keep the Authorization header or a request body that might be a token. The status explains the outcome. It is not a place to echo secrets back to the client either.
Example response
HTTP 205 Reset ContentHTTP/1.1 205 Reset Content
Like 204, there is no body. The difference is the instruction to the user agent. Browsers historically clear the form. Script clients need to implement that themselves if they care. If you are not talking to a document view, 204 is the clearer status.
What the client should do
If you rendered a form, clear it. If you are an API client with no view, treat 205 like 204: success, no body.
Do not cache 205 as a representation of the resource. It is an instruction about the view.
The action already succeeded. Retrying the submission can create a second record if the method was POST. Clear the form instead of resubmitting.
Codes people confuse with HTTP 205
204 is success with no body and no reset instruction. 303 is a redirect to another URL. 205 stays on the current document and clears it.
Frequently asked questions
Does 205 have a body?
No. The message is the instruction to reset the view.
Will every client clear the form?
Browsers may. API clients will not unless you wrote that behavior.
When should I prefer 204?
When there is no view to reset. 204 does not ask the client to change the document.
Is this a redirect?
No. The URL stays. The form contents go.
What should I do first when I see HTTP 205?
Read the status as 205 Reset Content specifically. 205 Reset Content means success, and the client should reset the view that sent the request. Then check the cause that matches the request you sent, starting with: A data-entry form was accepted and should be emptied for the next row.