- Home
- Tools
- Developer Tools
- HTTP Status Codes
- 204 No Content
204 No Content
The request succeeded and the response has no body. The usual answer to a delete, or to a save that leaves the page as it is.
- Class
- 2xx Successful. The request was received, understood and accepted.
- Defined in
- RFC 9110
When a server sends it
When there is nothing useful to send back: after a DELETE, after a PUT or PATCH whose result the client already knows, and often in answer to the OPTIONS request a browser sends ahead of a cross-origin call. The response ends right after the headers.
What to do with it
Nothing: it is a success. A browser that gets a 204 for a link or a form stays on the page it was on.
In code, don't try to read a body. Calling response.json() on a 204 throws an error, a common bug in API clients. If you build an API, send no body with a 204.
Not to be confused with
| 200 OK | Success with a body. |
|---|---|
| 205 Reset Content | No body either, and the client should clear its form. |
How Google treats it
For Google a 204 means there was no content to process, so nothing is indexed.
All codes are on the list of HTTP status codes, which can be searched by number and by word.