201
Created
Specification of the HTTP status code 201
Source / Quote by: The 201 Created HTTP Status Code is specified by section 6.3.2 of RFC7231.
HTTP-Protocol
How to throw a 201 statuscode with PHP?
To throw the HTTP status code 201 on a web page, the PHP function http_response_code can be used. The syntax is as follows: http_response_code(201) (PHP 5 >= 5.4.0, PHP 7, PHP 8)
Test the 201 HTTP status code
In order to be able to display the HTTP status code (in this case 201 Created) 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:
URL: https://http-statuscode.com/errorCodeExample.php?code=201
Status: 201 Created
Those: Network
IP address: XX.XX.XX.XX
Browser compatibility of the 201 status code
Chrome | Yes |
Edge | Yes |
Firefox | Yes |
Opera | Yes |
Safari | Yes |
Chrome Android | Yes |
Firefox for Android | Yes |
Opera Android | Yes |
Safari on iOS | Yes |
Internet | Yes |
WebView Android | Yes |
Constants in programming languages
External links with more information about HTTP status code 201:
Funny memes about HTTP status code 201
Blog Articles
HTTP status codes 200 OK and 201 Created: successful, but different in meaning
The history of HTTP status codes. The history of HTTP status codes dates back to 1996, when the 200 OK status code came into existence with the introduction of HTTP 1.0. At that time, this code was...
SEO and HTTP status codes: A comprehensive analysis
Optimizing a website for search engines (SEO) is a complex undertaking. One of the often overlooked but crucial aspects for a good ranking are HTTP status codes. These small, three-digit codes info...