跳到主要内容

5. Header Field 汇总

本节汇总 RFC 7234 Section 5 的头字段定义. 具体内容已拆分到以下章节文件, 以便逐节阅读和维护.

章节索引

  • Section 5, 5.1 和 5.2 的基础语法见 5-header-field-definitions.md.
  • Section 5.2.1 的 request Cache-Control directive 见 5-2-1-request-directives.md.
  • Section 5.2.2 的 response Cache-Control directive 见 5-2-2-response-directives.md.
  • Section 5.2.3 到 5.4 的 extension, Expires 和 Pragma 见 5-2-3-to-5-4-extensions-expires-pragma.md.
  • Section 5.5 的 Warning header field 见 5-5-warning.md.
  • Section 5.5.1 到 5.5.7 的 warn-code 定义见 5-5-1-to-5-5-7-warn-codes.md.

覆盖范围

Section 5 定义与 HTTP caching 相关的 header field, 包括 Age, Cache-Control, Expires, Pragma 和 Warning.

Cache-Control directive 是本节的核心内容. request directive 包括 max-age, max-stale, min-fresh, no-cache, no-store, no-transform 和 only-if-cached. response directive 包括 must-revalidate, no-cache, no-store, no-transform, public, private, proxy-revalidate, max-age 和 s-maxage.

ABNF, 示例和 warn-code 表在对应拆分页中保留原始技术标记. BCP 14 规范性关键词按原文保留, 以便与 RFC 2119/RFC 8174 语义一致.