HTTP status code 205 “Reset Content” is a successful status code indicating that the server has successfully processed the client’s request but does not intend to return any content. Similar to 204 “No Content,” the 205 status code informs the client that there is no additional content to return. However, it also implies that the server wants the client to reset the document view, such as clearing form contents, resetting canvas states, or refreshing the user interface.
Common Use Cases for Status Code 205:
-
Form Reset: When a user submits a form, and the server has processed it, the server may want the user to reset the form for future inputs. For instance, in a data entry interface, after submitting data, the server might want to clear that data to allow the user to start fresh.
-
UI Refresh: In some interactive web applications, the server may require the client to refresh the user interface after data submission to ensure the user sees the most current state or data.
When the server returns a 205 status code, it should not include any response body; the message body must be empty. If the response contains a body, it should be similar to 204 “No Content” and not include any content. Additionally, 205 responses are typically not cached, as they are usually related to user interface operations specific to individual users.
For example, if a user submits data through a form and the server processes it while wanting the client to clear the form for new input, the server might send the following response:
HTTP/1.1 205 Reset
Content Content-Type: text/html
Content-Length: 0
In this example, the status code 205 indicates that the server successfully processed the request, and the empty response body signals the client to reset the current document view.