Getting XHTML into Internet Explorer while using application/xhtml+xml

Hi Tina,

I had an action item to get you examples of delivering XHTML to IE while  
using application/xhtml+xml.

Sorry it took so long, I had to do some digging, and use a different  
machine, since I have a filter on my main machine that accepts  
application/xhtml+xml anyway.

So, I first discovered that it was possible by mistake. I couldn't work  
out why I could see

	http://www.w3.org/International/tests/sec-ruby-markup-1.html

even though it claimed it was being sent as application/xhtml+xml (and  
that checked out in Opera, where you can request that sort of information).

Other examples of application/html+xml documents working in IE are at
	http://www.w3.org/MarkUp/Test/xhtml-print/current/

All the tests are served as application/xhtml+xml.

But try http://www.w3.org/International/tests/sec-ruby-markup-1 (which  
just serves the same file) and IE will give you the download dialogue, and  
modern browsers will display it. So the .html (and .htm in the xhtml-print  
tests) do make a difference to IE.

So my conclusion: it is done with URL sniffing and content sniffing (which  
is why you can serve html as text/plain as well if the urge takes you). I  
think if the URL matches then IE will sniff the content, and for IE that  
means (I seem to remember) looking for <title> in the first 256 (512?)  
characters of the file.

For the URL sniffing, it used to be possible to just append "?.html" to a  
URL, but that doesn't seem to work anymore.

See also:
http://blogs.msdn.com/ie/archive/2005/02/01/364581.aspx
http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx

Hope this helps,

Steven

Received on Monday, 29 September 2008 14:50:47 UTC