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 ExpiresIs it an oversight or is it on purpose? [1] https://www.rfc-editor.org/rfc/rfc9110#status.304
RFC 9110: HTTP Semantics
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...
2 Replies
It's an older issue: https://discord.com/channels/595317990191398933/789155108529111069/1125520527746932927
One of those things where the RFC says one thing but browsers don't actually care and work perfectly fine without it, so not very high prio to fix
Thanks! I tried to search for some past discussion about this, but didn't find this one. Another interesting deviation between RFCs and implementations :/
You are a human search engine 🙂