There appears to be some confusion about Internet Explorer's inability to handle XHTML documents delivered with the correct MIME type. Adding a registry entry to instruct Internet Explorer to handle content served as
text/html is not a solution. Content developers who serve the correct MIME type are likely to be using the XML features of XHTML; telling Internet Explorer to handle that content as text/html is just plain wrong.
Author: Gez Lemon
Is IE just missing a Registry Entry?
I received the following email today (name of sender removed).
I have applied this trick on IE and it seems to be working.
Despite several attempts, my reply keeps bouncing back to me. As it's quite relevant to recent topics on this website, I've decided to post the reply here.
Peter Provost's article provides a solution that stops Internet Explorer offering to download files delivered as
application/xhtml+xml with a registry hack, offering the following explanation.
Although a number of people seem to think that Internet Explorer doesn't support it, the real answer is that it is just missing an entry in the registry to tell it what to do with that MIME type.
Unfortunately, that is completely incorrect. Internet Explorer is not able to handle documents served as
application/xhtml+xml, and all the registry hack does is tell Internet Explorer to handle the document as
text/html by providing the CLSID for
text/html against an entry for
application/xhtml+xml in the registry. Considering there are already user agents that are capable of handling the correct MIME type, what is the point of adding a registry entry to trick it into handling the content as
text/html? It doesn't affect the accept header sent by Internet Explorer (thankfully), so any website using content negotiation will continue to send the content as
From a web developer's perspective, it doesn't help at all. It's a ridiculous enough notion to inform users that your website is best viewed in a particular browser at a particular resolution. Most developers are now sensible enough to realise that a visitor is unlikely to change their browser and the resolution of their monitor just to view a website. This solution is taking it one step further: In order to view this website, you will need to add the following entry in your Windows registry.
Still Tag Soup
Even if everybody who runs Internet Explorer on a Windows operating system decided to add the registry entry, and there were websites that served content as
application/xhtml+xml regardless of the capabilities of the browser, what exactly does the registry hack achieve? XML stylesheet declarations are completely ignored, as is the case of other XML features such as
xml:base. Content isn't parsed for well-formedness. The markup will still have implicit elements, such as a
tbody in tables if one hasn't been explicitly added in the markup. There are also a whole host of scripting problems, such as
CDATA comments being ignored, and SGML comments,
innerHTML all being obeyed, as well as countless other issues. If a developer has to use XHTML, and is concerned about Internet Explorer, they should either deliver the content as
text/html following the HTML Compatibility Guidelines, or use content negotiation to deliver
application/xhtml+xml to user agents that understand it, and
text/html to other user agents.
All the registry hack does is make Internet Explorer handle content delivered as
text/html. Most content delivered as
application/xhtml+xml does not follow the HTML Compatibility Guidelines, meaning that Internet Explorer has to rely on its error handling capabilities even harder than it normally does just to render a page. A simpler solution would be to get a better browser.
The tone of the original email was far more polite than what I've written here. In re-writing it here, I almost slipped into a rant. :-)
Category: Web Standards.