Erik Aronesty

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromErik Aronesty
ToMe
Subjecthttp://www.howtocreate.co.uk/wrongWithIE/justplaintext.txt
Date15 June 2005 16:32
The problem is that the mime type returned by your web server is not
compliant with the standard.

It's compliant with an RFC.  But the RFC is relatively recent and is
certainly not a "standard".

[Ed, in almost all cases, RFCs are the "standard" when talking about
Networking protocols]

Your webserver returns:

	Content-Type: text/plain; charset=UTF-8

your webserver should simply return:

	Content-Type: text/plain

IMHO, The character set should be indicated in a separate header, if at all.

- Erik
FromMe
ToErik Aronesty
SubjectRe: http://www.howtocreate.co.uk/wrongWithIE/justplaintext.txt
Date15 June 2005 22:21
Erik,

> The problem is that the mime type returned by your web server is not
> compliant with the standard.

No. That has absolutely nothing to do with the problem at all. The problem
is that IE uses content type sniffing, and will ignore the mime type and
file extension if it considers the file type to be untrustworthy - and
text/plain is considered untrustworthy.

Microsoft have documented this themselves on
http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.asp
"A MIME type is ambiguous if it is 'text/plain', 'application/octet-stream',
an empty string, or null"

Since it will _only_ apply the content type guessing in these circumstances,
and it is applying it to my page, it must be correctly recognising the mime
type my server is sending as "text/plain". It then chooses to ignore it.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromErik Aronesty
ToMe
SubjectRe: http://www.howtocreate.co.uk/wrongWithIE/justplaintext.txt
Date16 June 2005 00:08
Right, my test was off.  They sniff for text/plain and octet-streams.   

They also sniff any time a charset appears in the content-type.  

For example, if you specify text/html with a charset of utf-8, and your HTML
contains too much whitespeace at the top, then IE will render the HTML as
text.

I got the problem you were illustrating reversed in my head.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.