HTTPfy

204 No Content

Success with no response body.

204 at a glance

Code
204
Name
No Content
Class
2xx Successful
Status
IANA-registered standard code
Defined in
RFC 9110, Section 15.3.5
Cacheable by default
Yes, heuristically cacheable (RFC 9110 section 15.1): without Cache-Control or Expires, caches may store it and pick a freshness lifetime themselves. Send explicit Cache-Control to stay in control.

What 204 means

204 No Content says the action worked and there is nothing to send back. The response cannot have a body; everything after the headers is the next response. Browsers stay on the current page when a link or form gets a 204. It is heuristically cacheable.

What typically causes a 204

  • DELETE and PUT endpoints in REST APIs.
  • CORS preflight (OPTIONS) responses, which many frameworks answer with 204.
  • Analytics beacons and navigator.sendBeacon endpoints.
  • Android and ChromeOS captive-portal checks expect a 204 from /generate_204.

Fix it on the server

  • Do not send a body or Content-Length greater than 0 with 204; some proxies will break the connection.
  • If the client needs the updated resource, return 200 with the body instead.

Fix it as a client or visitor

  • Do not try to parse JSON from a 204; check the status before calling response.json().

Headers that go with 204

HeaderRole
ETagCan carry the new validator after a PUT.

Example response

HTTP/1.1 204 No Content
Date: Tue, 10 Nov 2026 12:00:00 GMT
Access-Control-Allow-Origin: https://app.example.com

Opens the HTTP headers tool with your URL filled in; it shows the status line and headers of every redirect hop.