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] https://www.rfc-editor.org/rfc/rfc9110#status.304
The Hypertext Transfer Protocol (HTTP) is a stateless application-level
protocol for distributed, collaborative, hypertext information systems.
This document describes the overall architecture of HTTP, establishes common
terminology, and defines aspects of the protocol that are shared by all
versions. In this definition a...
Was this page helpful?