Visual RFC.
ALL RFCs / RFC 7240
Read the RFC ↗
RFC 7240 / HTTP PREFER

Keep cache variants separate

06

A preference can change a response in ways that matter to a cache. Vary tells a cache which request fields were relevant to selecting a stored response.

RFC 7240 · § 2EXAMPLE
4 / 4
Keep cache variants separateA preference can change a response in ways that matter to a cache. Vary tells a cache which request fields were relevant to selecting a stored response. Asynchronous state and extra representations cost resources. The server may decline a preference rather than commit unlimited work. New preferences have their own specifications and security considerations; this guide covers the initial RFC 7240 set.Vary separates request-dependent variantsFinite server resourcesMay ignore costly preferenceNo unlimited work obligationEach extension has its own security rulesRFC7240 · chapter6 · state4 · illustrative server policy
04
Keep resource policy with the server

Asynchronous state and extra representations cost resources. The server may decline a preference rather than commit unlimited work. New preferences have their own specifications and security considerations; this guide covers the initial RFC 7240 set.

Source for this drawing: RFC 7240 · Read RFC section 2 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

Prefer SHOULD NOT be used for content negotiation. If supported optional behavior can affect cache handling, the response MUST include Vary: Prefer even when the request omitted Prefer.

  • Prefer SHOULD NOT be used for content negotiation. If supported optional behavior can affect cache handling, the response MUST include Vary: Prefer even when the request omitted Prefer.
  • Vary: * is an allowed alternative; a proxy cannot use that response to satisfy a later request from its cache.
  • Servers may ignore preferences to avoid excessive resource costs. New preferences use a Specification Required registry; consult each definition and its security considerations.
DETAILS

Examples show one chosen server policy. Preferences are optional; consult the linked requirements, errata and RFC 8144 WebDAV update.

Read the RFC section ↗

All chapters in RFC 7240

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗