What Is a 226 Status Code?
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.
The actual current instance might not be available except by combining this response with other previous or future responses, as appropriate for the specific instance-manipulation(s). If so, the headers of the resulting instance are the result of combining the headers from the 226 response and the other instances, following the rules in section 13.5.3 of the HTTP/1.1 specification.
The request MUST have included an A-IM header field listing at least one instance-manipulation. The response MUST include an Etag header field giving the entity tag of the current instance.
A response received with a status code of 226 MAY be stored by a cache and used in reply to a subsequent request, subject to the HTTP expiration mechanism and any Cache-Control headers, and to the requirements in section 10.6.
A response received with a status code of 226 MAY be used by a cache, in conjunction with a cache entry for the base instance, to create a cache entry for the current instance.
- Source: RFC3229 Section 10.4.1
226 CODE REFERENCES
Rails HTTP Status Symbol
Symfony HTTP Status Constant
Apache HttpComponents Core
What does a 226 status code do?
This status code helps intermediaries, such as proxies or content delivery networks (CDNs), communicate to clients that they had applied a transformation to the original response. In some cases, the transformation may be required for the resource to be delivered to the client successfully.
When is a 226 HTTP status code used?
Examples of when a 226 status code might be used include:
- When a CDN compresses an image file to reduce its size
- When a proxy server encrypts a web page to protect the user’s privacy
- When a web server compresses a response to reduce bandwidth usage
3+ best practices for the 226 status code
Here are some best practices you should follow for using 226 status codes:
- Use the “IM” header field to describe the transformation that was applied to the response
- Ensure the transformation does not negatively affect the resource’s functionality or accessibility
- Provide a way for clients to access the unmodified response if necessary
- Ensure that the transformation is compatible with a wide range of clients
Troubleshooting a 226 status code
If you encounter a 226 status code, there are a few things you can do to troubleshoot the issue:
- Check the “IM” header field to determine the type of transformation applied to the response
- Ensure your client is compatible with the transformation was applied
- Check to see if there is a way to access the unmodified response
If you are having difficulty resolving the issue, you may need to reach out to the intermediary that applied the transformation or the server administrator to get more information about the transformation and how to access the resource.
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs