At byte 999,999 the download dies. The client holds a million bytes of a file and wants the remainder. It knows precisely where to resume — byte 1,000,000 — and that precision is the trap. An offset tells you where a fragment sits in a sequence. It tells you nothing about which sequence.

Suppose an editor slipped a paragraph in near the top, a build replaced the archive, or content negotiation quietly switched to a different encoding. The same offset now points into a different object. The client appends a flawlessly delivered suffix to a stale prefix and saves a file that never existed on any server. No error fires. No alarm sounds. The corruption is silent, complete, and shipped.

HTTP solved this in 1997 with one of the most economical branches in the protocol: If-Range. It let a single GET say, in effect, process my range if this strong validator still matches; otherwise forget the range and send me the whole current thing. The condition did not make downloads faster. It made them honest.

Summary

  • A byte offset says where a fragment belongs, but never which version of a representation it belongs to.
  • If-Range compressed two outcomes into one exchange: honour the Range if the strong validator still matches, otherwise ignore the range and return the entire current representation.
  • The branch avoided a second round trip and stopped old and new bytes from being welded together — while leaving range support, storage, reassembly and content correctness to separate decisions.

The million-byte problem: an offset is not an identity

This was never merely a transport interruption. TCP could tell the application that one connection had ended, but the next HTTP request opened a fresh exchange against a resource whose selected representation might have changed in the meantime. Position and identity had to travel as separate facts. Range named the desired interval. Something else had to testify that the client's stored interval and the server's present interval were still eligible to share one object.

Without that testimony, resumption is a gamble dressed as an optimisation. The client is not asking for bytes 1,000,000 onward in the abstract; it is asking for the continuation of its copy. Those are different requests, and only one of them is safe.

RFC 2068, 1997: the one-line branch

The first standards-track HTTP/1.1 specification, RFC 2068, gave the problem a compact answer. A client holding a partial entity could already pair Range with an ordinary precondition such as If-Match — but that was clumsy arithmetic. If the entity had changed, the server rejected the condition, and the client needed a second request to fetch the complete current body. Two round trips to learn something the first request could have handled.

If-Range folded the recovery into one exchange: return the missing part if the entity is unchanged; otherwise return the entire new entity. RFC 2616 carried the mechanism into the 1999 HTTP/1.1 consolidation, where its two ordinary outcomes became plainly visible. Entity tag matches — serve the subrange with 206 Partial Content. Entity tag does not match — serve the whole entity with 200 OK. The false condition did not make the retrieval fail. It revoked only the economy of finishing the old copy.

One request, two acceptable shapes

A typical request stacked two fields:

Range: bytes=1000000-
If-Range: "version-17"

The client was not declaring that a partial reply was the only acceptable result. It was declaring that a partial reply was acceptable only under the named continuity condition. A match kept Range in force. A mismatch made the recipient ignore Range, so the ordinary successful GET yielded the full current selected representation.

This is why If-Range refuses to be flattened into the other HTTP preconditions. If-Match can stop a method dead and produce 412 Precondition Failed. If-None-Match can turn a conditional GET into 304 Not Modified. If-Range does neither. In the mismatch branch the client has already conceded that the full current representation is useful. The response changes shape instead of collapsing into an empty refusal.

The 2014 range specification, RFC 7233, described the mechanism as short-circuiting the second request, and tightened the grammar's operational use. A client must not send If-Range without Range; a server ignores it when Range is absent or the target does not support ranges. Match — process the range. No match — ignore the range. The exactness lives in the branch, not in any expectation that every request will produce 206.

The current consolidation in RFC 9110 makes the evaluation order explicit. With GET, Range and If-Range, a true condition plus an applicable range yields 206. Otherwise the range field is ignored and the response is 200. Failures detectable earlier still take precedence. A condition cannot compel a server to support ranges, cannot turn an invalid interval into a valid one, and cannot bypass normal representation selection.

Strong validators: exact bytes or nothing

HTTP keeps both strong and weak validators because not every comparison asks the same question. Two representations may be semantically interchangeable enough for cache freshness while differing byte for byte. That looseness is a feature when a client only wants to know whether a cached page is still worth displaying. It is a liability when the client intends to weld a new interval onto stored bytes.

RFC 7232 settles the matter: a strong validator changes whenever observable representation data changes, and is usable for partial content ranges. A weak validator is reserved for cases where exact equality is unnecessary. Consequently a client must not place a weak entity tag in If-Range. A Last-Modified date is permitted only when the client lacks an entity tag and the date itself qualifies as strong.

Dates show why the rule is strict. A resource can change twice inside one clock tick, or an origin can emit a timestamp whose relationship to the generated bytes is uncertain. If-Range compares an HTTP date exactly against the selected representation's Last-Modified value; it does not inherit the 'earlier than or equal to' leniency of If-Unmodified-Since. If the date is not strong enough, the condition is false. Saving bytes is never worth pretending that coarse time proves version continuity.

An entity tag is also opaque by design. The protocol never requires it to be a cryptographic digest, and no client can infer the generating algorithm from a pair of quotation marks. Strong comparison means only this: this origin will not reuse the validator across byte-different representations of this resource in the relevant period. It does not authenticate the origin, certify the file's meaning, or establish equality with an object at another URL. RFC 2616 already warned that reusing a tag across different URIs implies nothing about equivalence.

A match opens range processing, not a promise of 206

Suppose the strong tag matches. The server still has questions to answer. Does this target support the requested range unit? Is the syntax valid? Does the interval overlap the current selected representation? Are the requested ranges reasonable to serve? If-Range decides which version branch is safe; ordinary range semantics decide whether the range can actually be fulfilled.

For a supported, valid and satisfiable byte range, the normal result is 206 Partial Content. A single-part response carries Content-Range, locating the returned bytes inside the selected representation and reporting the complete length when known. Multiple intervals use multipart/byteranges, each part carrying its own range description. If no requested interval is satisfiable, the server may return 416 Range Not Satisfiable and report the current length.

These distinctions stop metadata from acquiring power it does not possess. Content-Range: bytes 1000000-1999999/5000000 says where one million returned bytes sit inside a five-million-byte representation. It does not say the client's first million came from the same version. That authority comes from the shared strong validator and its comparison — and even a matching validator proves nothing about whether the client received the whole response or wrote it down correctly.

The false branch is conservative in a revealing way. A validator mismatch can cost bandwidth, because the complete current representation crosses the network. But the replacement is coherent. A false match is far worse: the client silently assembles a hybrid whose prefix and suffix come from different versions. HTTP chose to make uncertain continuity expensive rather than invisible.

Caches had to guard the same seam

A cache may hold an incomplete 200 response, a 206 response, or several disjoint ranges. That makes it a participant in assembly rather than a passive box. RFC 7234 allowed incomplete responses to be stored only by caches that understood Range and Content-Range, and allowed several ranges to be combined only if they shared the same strong validator.

The rule kills a plausible but invalid optimisation. A cache cannot take a prefix from Monday, a middle interval from Tuesday and a suffix from Wednesday merely because their coordinates tile the file without gaps. Coverage is not continuity. Every part must refer to the same selected representation version, and response metadata must be updated under the combination rules.

RFC 9111 preserves the separation. A cache may complete a stored incomplete response with later range requests, but it must not treat the result as complete until it has actually become complete. It must mark a partial answer as 206. It may combine ranges only where strong-validator evidence is shared. Storage, reuse and completion remain local cache responsibilities; If-Range performs none of them remotely.

The evidence model is modest, and durable. The request target and selection inputs identify the resource and variant. Range records the interval requested. If-Range records the version evidence the client already holds. The server's current ETag or Last-Modified value supports the branch. The status and Content-Range describe the response. Only the client or cache can later establish that the pieces were received, assembled and retained.

Why the small condition still matters

The history of If-Range is easy to mistake for a convenience feature buried in download managers. Its deeper achievement was to keep a version decision close to the actors that actually held the evidence. The origin generated a validator for its selected representation. The client preserved that validator alongside its partial bytes and decided whether another interval was worth requesting. The server compared current state and chose a response shape. A cache kept its own custody record for stored parts.

No central catalogue had to assign file-version identities. No transfer service had to lock the resource until every interrupted client came home. The shared field carried only enough evidence for one next decision: may these requested bytes be treated as another part of the representation already held? A negative answer did not punish the request. It withdrew the optimisation and handed back a complete present copy.

The RFCs define the bargain; they do not show how any current product implements it. They cannot prove that a live ETag is strong, that an intermediary preserved it correctly, that a server truly supports ranges, or that a final file reached durable storage. Those claims need request and response captures, representation-selection inputs, validator history, byte hashes and the client's own assembly record.

Which is the quiet genius of the thing. HTTP did not build a global registry of file versions, and it did not ask anyone to trust a central authority with the answer. It handed each participant a narrow question and the exact evidence needed to answer it — and in doing so made a million-byte resume safe without making anyone the boss of the file.