204 No Content

All status codes
2xx · Successterminal

204No Content

The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.

What this code obliges you to do

Retry

Do not retry automatically

Repeating the same request produces the same result. A retry loop here just multiplies load and hides the real fault.

Caching

Cacheable by default

RFC 9110 lists this code as heuristically cacheable, so a cache may store it even with no Cache-Control header. Send explicit headers if that is not what you want.

Response body

Must not send a body

This status must be sent with no body at all. Clients and proxies will mis-frame the next response on a connection if you send one.

When you see it

2
1

Resource successfully deleted

2

Successful preflight CORS request

Effect on search

Neutral. Indicates no content is present, often used in API DELETE or PUT operations.

How to send it

1
Node.js (Express)
res.status(204).end();

Codes people confuse with this one

1
Class2xx
RetryNo
CacheDefault
BodyNone