If-Unmodified-Since
If-Unmodified-Since makes a request conditional on the selected representation not having been modified after the supplied date.
Technique Definition
If-Unmodified-Since makes a request conditional on the selected representation not having been modified after the supplied date. Under Existence Oracle analysis, it is the date-based precondition analogue to If-Match.
Primary Headers / Methods
Request Header
If-Unmodified-Since
Representation Metadata It Relies On
Last-Modified
Primary Method Context
PUTPATCHDELETE- Other methods where preventing changes to a newer representation matters
Secondary Method Context
- Can also matter with other representation-sensitive requests, but its clearest use here is state-protection precondition evaluation.
Can Elicit
Primary Differential
412 vs 404
Secondary / Adjacent Outcomes
2xx vs 404when the target exists and has not been modified after the supplied date, depending on the method and whether the request succeeds- Occasionally
2xxinstead of412if the RFC-permitted already-applied branch is used
Stage Role
Under this taxonomy, If-Unmodified-Since is the date-based trigger for the 412 vs 404 differential.
Best Use
If-Unmodified-Since is best used when the goal is to test date-based precondition evaluation rather than ETag-based precondition evaluation.
It is most useful when:
ETagis unavailable or unstableLast-Modifiedis available and meaningful- you want to confirm that date-based state-protection logic itself creates the existence signal
Why It Works as an Existence Trigger
A false If-Unmodified-Since evaluation shows that the server got far enough to locate the selected representation and compare its last modification date against the supplied condition. A nonexistent target does not reach that comparison outcome and instead bottoms out at 404 Not Found.
Method Applicability
PUT
- Primary method context.
- Useful when updates should fail if the server's representation is newer than the client expects.
PATCH
- Primary method context.
- Useful for partial modification under optimistic concurrency assumptions.
DELETE
- Primary method context.
- Useful when deletion should fail if the representation has changed since the client's last known state.
Other Methods
- Possible in broader HTTP semantics, but less central to the oracle classification here.
- This page stays focused on the
412 vs 404precondition branch rather than generalized conditional request behavior.
Trigger Strength / Normative Level
Strong Precondition Core, Weaker Response-Code Branch
When an origin server evaluates an If-Unmodified-Since condition and it evaluates false:
- the server MUST NOT perform the requested method
- the server MAY indicate failure with
412 Precondition Failed
Practical Result
This gives If-Unmodified-Since a real RFC-defined precondition basis, but the emitted 412 is not as rigidly mandated as the 304 / 412 branching for If-None-Match. That matters for portability.
Portability Notes
- This technique is weaker than
If-Matchbecause it depends on date comparison rather than ETag comparison. - Date validators are coarser than entity tags; timestamp granularity can make borderline cases ambiguous.
- Portability depends on the server exposing and honoring meaningful
Last-Modifiedsemantics. - Rapid same-second modifications, synthetic timestamps, or missing / coarse last-modified handling can reduce reliability.
- Caches and intermediaries can ignore this header because it is not applicable to a stored response; the oracle value here is origin-side precondition evaluation.
Detection Notes
- Establish a known-existing target and a known-nonexistent target.
- Use a method context where
If-Unmodified-Sincemeaningfully applies, such asPUT,PATCH, orDELETE. - Add only one manipulator: an
If-Unmodified-Sincedate designed to evaluate false for the existing target. - Compare outcomes.
- A
412on the existing target and404on the nonexistent target is the cleanest oracle confirmation for this technique.
Relationship to Other Techniques
Versus If-Match
If-Matchis the stronger ETag-based precondition technique.If-Unmodified-Sinceis the weaker, date-based analogue.
Versus If-Modified-Since
If-Modified-Sinceis date-based validator retrieval.If-Unmodified-Sinceis date-based state-protection / precondition evaluation.
Scope & Limitations
- It does not prove that a shared cache is present.
- It does not prove that a prior response was stored.
- It does not prove anything about freshness lifetime, cache keying, or cache hits.
- It only proves that RFC-defined date-based precondition evaluation reached an existing current representation.
If-Match
If-Match makes a request conditional on the origin server finding a current representation whose entity tag strongly matches one of the supplied validators.
Range Elicitation
Range elicitation techniques use the Range request header to force the server into representation-aware evaluation paths that diverge based on target existence.