226 IM Used
The server has completed a GET request for the resource, and the response is a representation of one or more instance-manipulations.
Usually happens because:
- ☑ Delta encoding requests where the client specifies A-IM (Accept-Instance-Manipulation) headers (e.g. A-IM
🔍 Quick Checklist:
Meaning
The HTTP 226 IM Used status code is returned by a server in response to a GET request when Delta encoding is active. It indicates that the server is returning only the diff (instance-manipulations) between the current version of the resource and a base version specified by the client in the A-IM request header.
Root Causes
- Delta encoding requests where the client specifies A-IM (Accept-Instance-Manipulation) headers (e.g. A-IM: feed, vcdiff).
| Cause | Frequency |
|---|---|
| Delta encoding requests where the client specifies A-IM (Accept-Instance-Manipulation) headers (e.g. A-IM | ⭐⭐⭐⭐⭐ |
Common Mistakes
- Returning a full response but claiming it is a delta diff in 226 headers.
- Clients failing to verify local ETag versions before querying.
How to Fix
Framework-Specific Examples
Express router handling A-IM delta encoding headers.
app.get('/feed', (req, res) => {
res.status(226).set('IM', 'feed').send('<diff></diff>');
});Server Configuration Examples
Allowing A-IM headers proxy pass configuration.
proxy_pass_header A-IM;
proxy_pass_header IM;Prevention
- Use robust delta-generation libraries (e.g. VCDIFF implementations).
- Verify connection ETag tags are generated consistently.
Frequently Asked Questions (FAQ)
Q: What does 'IM' stand for in 226 IM Used?
IM stands for Instance Manipulation. It refers to the specific algorithm or technique used to generate the delta/diff representation (e.g., feed diffs or vcdiff compression).
Q: What header is used to request Delta encoding?
The client must send the 'A-IM' (Accept-Instance-Manipulation) request header containing supported manipulation formats.
Q: Why is Delta encoding rarely used?
It adds complexity to the server cache layer and requires maintaining multiple diff baselines. Modern APIs prefer using timestamp query filters.
Q: What is returned in the ETag header during a 226 response?
The ETag header returns the entity tag representing the target resource *after* applying the manipulations, not the base version.