--- title: "204 No Content — what it means and how to fix it" description: "The request succeeded and there is deliberately no body to send back. What causes an HTTP 204, what to try as a visitor, and what to check if it is your own site." url: https://atoneplace.net/error/204/ site: "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 - [200 OK](https://atoneplace.net/error/200/) - [201 Created](https://atoneplace.net/error/201/) - [206 Partial Content](https://atoneplace.net/error/206/) - [202 Accepted](https://atoneplace.net/error/202/) - [207 Multi-Status](https://atoneplace.net/error/207/) - [203 Non-Authoritative Information](https://atoneplace.net/error/203/) - [205 Reset Content](https://atoneplace.net/error/205/) - [208 Already Reported](https://atoneplace.net/error/208/) - [226 IM Used](https://atoneplace.net/error/226/) ## Sources - Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA (https://www.iana.org/assignments/http-status-codes/) - RFC 9110: HTTP Semantics — IETF (https://www.rfc-editor.org/rfc/rfc9110.html)