204 No Content - HTTP | MDN

archived 10 Jun 2023 16:34:29 UTC

204 No Content

The HTTP 204 No Content success status response code indicates that a request has succeeded, but that the client doesn't need to navigate away from its current page.
This might be used, for example, when implementing "save and continue editing" functionality for a wiki site. In this case a PUT request would be used to save the page, and the 204 No Content response would be sent to indicate that the editor should not be replaced by some other page.
A 204 response is cacheable by default (an ETag header is included in such a response).

#Status

204 No Content

#Specifications

Specification
HTTP Semantics
# status.204

#Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
204

Legend

Tip: you can click/tap on a cell for more information.
Full supportFull support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

#Compatibility notes

  • Although this status code is intended to describe a response with no body, servers may erroneously include data following the headers. The protocol allows user agents to vary in how they process such responses (discussion regarding this specification text can be found here). This is observable in persistent connections, where the invalid body may include a distinct response to a subsequent request. Apple Safari rejects any such data. Google Chrome and Microsoft Edge discard up to four invalid bytes preceding a valid response. Firefox tolerates in excess of a kilobyte of invalid data preceding a valid response.

#See also

0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%