HTTP 226 IM Used indicates that the server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. Defined in RFC 3229, this status enables delta encoding — instead of sending the full resource every time, the server sends only what changed since the client's last version. This is a bandwidth optimization for resources that change incrementally, like large feeds or data files.
Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.
Simulator URL (copy in the app after load — not a normal link):
https://httpstatus.com/api/status/226
Example request:
curl -i "https://httpstatus.com/api/status/226"The server has fulfilled a GET request using delta encoding. The response represents the result of one or more instance-manipulations applied to the current instance.
On this code, Inspector focuses on semantics, headers, and correctness warnings that commonly affect clients and caches.
226 IM Used (RFC 3229) works with the A-IM (Accept-Instance-Manipulation) and IM (Instance Manipulation) headers. The client sends A-IM: vcdiff (or feed, diffe, etc.) along with If-None-Match to indicate the version it has. The server computes the delta between the client's version and the current version, then responds with 226, IM: vcdiff, and the delta as the body. This differs from 304 Not Modified (no change at all) and 200 OK (full representation). In practice, 226 is extremely rare — gzip compression and CDN caching have reduced the need for delta encoding. Google experimented with it for Chrome's SDCH (Shared Dictionary Compression for HTTP) but abandoned it.
// Conceptual delta encoding with 226 IM Used
const vcdiff = require('vcdiff');
app.get('/api/dataset', (req, res) => {
const acceptIM = req.headers['a-im'];
const clientETag = req.headers['if-none-match'];
const current = getDataset();
const currentETag = computeETag(current);
if (clientETag === currentETag) {
return res.status(304).end(); // Not Modified
}
if (acceptIM?.includes('vcdiff') && clientETag) {
const previous = getCachedVersion(clientETag);
if (previous) {
const delta = vcdiff.encode(previous, current);
return res.status(226)
.set('IM', 'vcdiff')
.set('ETag', currentETag)
.send(delta);
}
}
// Fallback: full response
res.set('ETag', currentETag).json(current);
});# Conceptual 226 IM Used implementation
from fastapi import Request, Response
@app.get('/api/dataset')
async def get_dataset(request: Request):
accept_im = request.headers.get('a-im', '')
client_etag = request.headers.get('if-none-match')
current = get_current_dataset()
current_etag = compute_etag(current)
if client_etag == current_etag:
return Response(status_code=304)
if 'vcdiff' in accept_im and client_etag:
previous = get_cached_version(client_etag)
if previous:
delta = compute_vcdiff(previous, current)
return Response(
content=delta, status_code=226,
headers={'IM': 'vcdiff', 'ETag': current_etag})
return Response(content=json.dumps(current),
headers={'ETag': current_etag})// Conceptual 226 implementation in Spring
@GetMapping("/api/dataset")
public ResponseEntity<byte[]> getDataset(
@RequestHeader(value = "A-IM", required = false) String acceptIM,
@RequestHeader(value = "If-None-Match", required = false) String clientETag) {
byte[] current = datasetService.getCurrent();
String currentETag = computeETag(current);
if (currentETag.equals(clientETag)) {
return ResponseEntity.status(304).build();
}
if (acceptIM != null && acceptIM.contains("vcdiff") && clientETag != null) {
byte[] previous = versionCache.get(clientETag);
if (previous != null) {
byte[] delta = VCDiff.encode(previous, current);
return ResponseEntity.status(226)
.header("IM", "vcdiff").header("ETag", currentETag)
.body(delta);
}
}
return ResponseEntity.ok().header("ETag", currentETag).body(current);
}func datasetHandler(w http.ResponseWriter, r *http.Request) {
acceptIM := r.Header.Get("A-IM")
clientETag := r.Header.Get("If-None-Match")
current := getCurrentDataset()
currentETag := computeETag(current)
if clientETag == currentETag {
w.WriteHeader(304)
return
}
if strings.Contains(acceptIM, "vcdiff") && clientETag != "" {
if prev, ok := versionCache[clientETag]; ok {
delta := computeVCDiff(prev, current)
w.Header().Set("IM", "vcdiff")
w.Header().Set("ETag", currentETag)
w.WriteHeader(226)
w.Write(delta)
return
}
}
w.Header().Set("ETag", currentETag)
w.Write(current)
}