Media Type Sniffing

Many Web servers supply incorrect Content-Type headers with their HTTP responses. In order to be compatible with these Web servers, Web browsers must consider the content of HTTP responses as well as the Content-Type header when determining the effective mime type of the response. This document describes an algorithm for determining the effective mime type of HTTP responses that balances security and compatibility considerations.