A-IM
Delta encoding reduces bandwidth by transferring only the differences between resource versions. The A-IM request header lists the instance manipulations a client accepts for this process.
Usage
The A-IM header is part of the delta encoding mechanism. Instead of transferring a full resource on every request, a server sends only the differences (a delta) between the version the client already has and the current version. The A-IM header tells the server which delta algorithms the client understands.
A client pairs A-IM with standard conditional request headers like If-None-Match to identify the cached version. When the server has a matching base version and supports one of the listed algorithms, the response carries a 226 IM Used status code. The IM response header confirms which algorithm was applied, and the Delta-Base header identifies the base version the delta is computed against.
Quality values rank the preferred algorithms when multiple options are listed. The server selects the highest-ranked algorithm available.
Values
vcdiff
VCDIFF format, a binary delta encoding. Efficient for transferring changes between versions of binary or text resources.
diffe
A diff-based encoding producing ed script output
(the format of diff -e). Ed scripts use a, c,
and d commands to describe line-level changes.
Suited for text resources where changes are
line-oriented.
gdiff
GDIFF format, a generic binary delta encoding based on the W3C GDIFF submission. An alternative to VCDIFF for binary differencing.
gzip
Standard gzip compression applied to the delta. Often combined with another instance manipulation.
deflate
Zlib deflate compression applied to the delta. Like gzip, often combined with another instance manipulation.
range
Selects a byte range as an instance manipulation.
Combines delta encoding with partial responses. The
position of range in the list matters: listed last,
the range applies to the output of the other instance
manipulations.
identity
No transformation applied. The value is meaningful only in A-IM, where it signals a plain full response remains acceptable.
;q= (quality value)
A weight between 0 and 1 expressing relative
preference among the listed algorithms. The default
is 1.0.
Example
A client indicating support for VCDIFF delta encoding
with gzip as a lower-priority alternative. The quality
value 0.4 on gzip signals a preference for VCDIFF.
A-IM: vcdiff, gzip;q=0.4
A full request combining A-IM with conditional headers. The client sends an ETag from a previous response and requests a delta update.
GET /data.json HTTP/1.1
Host: api.example.re
If-None-Match: "abc123"
A-IM: vcdiff
The server responds with 226 IM Used, the applied algorithm in IM, and the base version reference in Delta-Base.
HTTP/1.1 226 IM Used
ETag: "def456"
IM: vcdiff
Delta-Base: "abc123"
Why delta encoding never deployed
The design coupled tightly to conditional requests. An A-IM request naming a delta coding is invalid without If-None-Match carrying an entity tag from a prior response, since a delta needs a base, and Delta-Base exists to name which base the server chose. Responses arrive as 226 rather than 200, picked precisely because legacy proxies forwarded unknown status codes without caching them.
Cache safety is what broke the scheme. The
specification defines an im cache-control extension
letting aware caches store a 226 behind a
no-store shield, then concedes uncertainty about
whether deployed caches honor the override, and
warns of unaware proxies serving a delta despite a
correct Vary header, delivering a diff to a
client holding no base. A mechanism unsafe against
the installed intermediary base stays undeployed, and
this one did.
The exception was syndication. The feed instance
manipulation, layered onto the header in 2004,
stripped already-seen entries from RSS and Atom
responses, shipped in Textpattern, the Windows RSS
platform, and a spread of feed readers, and cut
transfer sizes to roughly a quarter for participating
clients. Real deployments widely answered with a
plain 200 rather than the required 226,
which says as much about the specification's fit as
the bandwidth numbers do.
The successor abandons the extra axis entirely. Compression dictionaries through Use-As-Dictionary and Available-Dictionary deliver the same send-only-the-difference outcome as content codings inside Accept-Encoding, a dimension every cache already understands.