Tip: how to force ie to display text/plain

Yedidia Klein

This is really old stuff but I have stumbled upon it lately, but IE will not believe you try to serve him plain text, sort of getting insulted by the simple task of rendering plain text, and try to guess what you really serve.

When it thinks you served something he can do butter showoff with like HTML, it will render it as such, and when it fails it will treat this as a file that should be downloaded.

Well all of this sad story sucks if you really want to display plain text, so the magic is to borrow MIME header called "Content-Disposition" and give it a value like "inline;filename=foobar.txt" which will hint IE to render the plain text as is.

P.S. this is mainly a note to myself, fill free to ignore or comment about how much I got it wrong.

Binat Building Har Hotzvim Jerusalem 97787 St Natanzon 5/2 026310246 | 0526071135 | 0524767193 | sales@openapp.co.il