At One Place

HTTP 204 — No Content

HTTP 204
No Content
The request succeeded and there is deliberately no body to send back.

What 204 actually means

Success with nothing to say. The classic use is DELETE: the resource is gone, there is nothing sensible to return, so the server sends 204 and stops. It is also common for PUT and PATCH where the client already knows the new state, and for endpoints whose only job is a side effect. A 204 must not have a body — sending one is a protocol violation and some clients will choke on it.

Common causes

  • A DELETE completed successfully
  • A PUT or PATCH saved changes and the server has nothing to add
  • A beacon, analytics ping or preference-save endpoint acknowledged the request

If you're just trying to view the page

  1. Nothing — the action worked; a blank response here is correct, not a broken page
  2. If the interface still shows the old state, reload — the server saved the change but the page did not refresh

If it's your site

  1. Never send a response body with a 204; clients that follow the spec will not read it and some will error
  2. If the client needs the updated object back, return 200 with the body instead
  3. Watch for front-end code calling `response.json()` on a 204 — that throws, and it is a very common bug

Reference

Status code
204
Reason phrase
No Content
Category
2xx — Success
Cacheable by default
Yes
Defined in
RFC 9110 §15.3.5

Common questions

What does HTTP 204 mean?
The request succeeded and there is deliberately no body to send back. Success with nothing to say. The classic use is DELETE: the resource is gone, there is nothing sensible to return, so the server sends 204 and stops.
How do I fix a 204 error?
Nothing — the action worked; a blank response here is correct, not a broken page
Is 204 a client error or a server error?
204 is in the 2xx range, which means success. It is not an error at all.

Related pages

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked