Reset Content

the client should reset the document to its original state. The request was successful

Specification of the HTTP status code 205

The 205 Reset Content status code indicates that the server has fulfilled the request and desires that the user agent reset the "document view", which caused the request to be sent, to its original state as received from the origin server.

This response is intended to support a common data entry use case where the user receives content that supports data entry (a form, notepad, canvas, etc.), enters or manipulates data in that space, causes the entered data to be submitted in a request, and then the data entry mechanism is reset for the next entry so that the user can easily initiate another input action.

Since the 205 Reset Content status code implies that no additional content will be provided, a server MUST NOT generate a payload in a 205 Reset Content response. In other words, a server MUST do one of the following for a 205 Reset Content response: a) indicate a zero-length body for the response by including a Content-Length header field with a value of 0; b) indicate a zero-length payload for the response by including a Transfer-Encoding header field with a value of chunked and a message body consisting of a single chunk of zero-length; or, c) close the connection immediately after sending the blank line terminating the header section.

Source / Quote by: The 205 Reset Content HTTP Status Code is specified by section 6.3.6 of RFC7231.

How to throw a 205 statuscode with PHP?

To throw the HTTP status code 205 on a web page, the PHP function http_response_code can be used. The syntax is as follows: http_response_code(205) (PHP 5 >= 5.4.0, PHP 7, PHP 8)

Test the 205 HTTP status code

In order to be able to display the HTTP status code (in this case 205 Reset Content) and other information on the client side, the development console must be opened with F12. Afterwards you have to navigate to the tab "Network". Now you can open the page, in the network tab you should see the web page (example index.php). This must be selected and then the Herder section must be selected. Here the user will see the following result:

Status code 205 Reset Content
URL: https://http-statuscode.com/errorCodeExample.php?code=205
Status: 205 Reset Content
Those: Network
IP address: XX.XX.XX.XX
Status code 205 Reset Content

Browser compatibility of the 205 status code

Chrome no data
Edge no data
Firefox no data
Opera no data
Safari no data
Chrome Android no data
Firefox for Android no data
Opera Android no data
Safari on iOS no data
Internet no data
WebView Android no data

Constants in programming languages

Author: Tony Brüser
Author: Tony Brüser

Tony Brüser is an enthusiastic web developer with a penchant for HTTP status codes.