Cache-Control and ETag headers missing in 304 responses

200 responses generated by Cloudflare Pages include a Cache-Control: public, max-age=0, must-revalidate and ETag headers. But those headers are missing in 304 responses.

RFC 9110 mentions the server MUST generate those headers [1]:

The server generating a 304 response MUST generate any of the following header fields that would have been sent in a 200 (OK) response to the same request:

  • Content-Location, Date, ETag, and Vary
  • Cache-Control and Expires

Is it an oversight or is it on purpose?

[1] RFC 9110: HTTP Semantics

I just learned on Discord that this is a long standing issue, but not high priority to fix as browsers don’t actually care: Discord