MIME types and plain text content
In IE9 Standards mode, documents delivered with a "text/plain" MIME type will not be MIME-sniffed to another type. Documents will render or download as plain text only.
If Windows Internet Explorer 9 encounters an HTML document delivered with a "text/plain" content-type, the document will be rendered as plain text unless the site is rendering in Compatibility View.
This is useful for web developer scenarios because it allows easier sharing of HTML source code snippets. It's also a welcome change from a security point of view, because Internet Explorer 9 is less susceptible to script injection attacks in files delivered with a "text/plain" Content Type.
As a result, we recommend the following:
- Use the content type "text/plain" to ensure a plain text rendering in Internet Explorer 9
- Configure your server to send proper Content-Type headers for all documents that your server will deliver; for instance, if your server offers Portable Document Format (PDF) files for download, be sure that these files are delivered with the "application/pdf" MIME type
If you find any sites that are sending improper MIME types and behave incorrectly in Windows Internet Explorer, please file a bug on Connect.
- MIME-Handling Changes in Internet Explorer
- Content Type Logic in Internet Explorer
- Handling MIME types in Internet Explorer
- MIME-type Detection in Internet Explorer