Cache validator
A cache validator is representation metadata a recipient can use in a conditional request.
- caching
- conditional requests
Definition
A validator is representation metadata used in conditional requests. Entity tags and modification dates are common validators, but they have different comparison rules and precision.
Why it matters
A recipient can send a stored validator with a later request. The server evaluates the condition against the selected representation and can avoid retransmitting content when the condition permits reuse.
ETag: "manual-v4"
If-None-Match: "manual-v4"
Expected result: the first field supplies an entity-tag validator on a response; the second presents that stored validator as a request condition. Their presence alone does not guarantee a 304 because the server evaluates the current selected representation.
Related terms
- Strong validator: suitable when equivalence requires the representation data to match according to the strong comparison rules.
- Weak validator: useful when two representations are semantically equivalent even if their bytes are not identical.
