Colin Cochrane

Colin Cochrane is a Software Developer based in Victoria, BC specializing in C#, PowerShell, Web Development and DevOps.

Internet Explorer 7 Did Not Kill XHTML

Professionally I make sure that I devote a certain amount of time every week to reading articles, whitepapers and blogs related to every aspect of web development. The subjects range from web design, to programming, SEO, and those that I spend a considerable amount of time reading about: web standards, accessibility, and pretty much anything related to the W3C. The communities based around those "W3C"-centric subjects are host to some extrordinarily well-research articles, posts and comments which is largely in part to the time afforded from the relatively slow pace in which major changes occur in respect to the major areas of HTML, XHTML and CSS.

Lack Of Support

One topic of controversy in this area has been Internet Explorer 7 not supporting the application/xhtml+xml MIME type, which essentially means not supporting true XHTML as specified by the W3C. Of course with this being related to Microsoft there is the expected amount of flak coming from the anti-Microsoft camp. That said, even once you've filtered out the extremes from the discourse, there are still a lot of people who think Internet Explorer 7 killed/is killing XHTML.

The support of Internet Explorer is certainly an important factor in the mainstream adoption of a web specification, considering that all versions of IE account for over 50% of web browsers used on the net. It seems reasonable that people would think that not supporting true XHTML would be a devastating blow to a specification that has been continually rising in popularity. In a time when IE is still recovering from the frustration of web developers everywhere about IE6's poor handling of CSS it's not hard to see why a lot of people think that the IE development team has a grudge against the W3C.

Tough But Fair

The IE development team is not stupid. They are also faced with the task of creating the browser that is used by millions of people every day. It is important to remember this because the decisions made regarding the development of IE are hardly made lightly. In a post on the IE Blog Chris Wilson, the lead program manager for the Internet Explorer platform and incendently a member of the XHTML 1.0 W3C working group, explained why IE7 does not support XHTML served as application/xhtml+xml.

The reasoning was that implementing support would involve hacking in XML constructs to the existing HTML parser in IE7. The existing parser is based on compatibility, and even if the support for properly served XHTML was implemented it would still have to accommodate invalid documents, which is exactly what shouldn't happen with an XHTML document (example of what happens when attempting to view an invalid XHTML document served as application/xhtml+xml). If support involves the same silent support for invalid documents, there is really no point.

In fact, had IE7 implemented support in this fashion it would have been worse for XHTML. Take a look at how many HTML documents on the web even come close to validating against their DOCTYPE. Now think about how many of those documents use XHTML (usually as a matter of the developer trying to look like they are on the cutting edge of the internet!. )If all of these non-valid XHTML documents stopped working in Internet Explorer the average IE user, discovering that a significant portion of the websites they visit don't display in their browser, would have reverted to IE6 (shudder), which would certainly have been counter-productive to the goal of increasing the adoption of XHTML.

All in all, it is natural to get impatient waiting for proper widespread support of XHTML. Just don't let the impatience make you lose sight of the big picture.

Comments (3) -

  • James Hackett

    11/12/2007 6:34:30 AM |

    I think a better idea would have been for the IE team to use two parsers instead of just ignoring application/xhtml+xml.

    The 2nd parser would only parse documents served as xhmtl. Any errors in the document would cause the parser to fail, but then the regular parser would start up and start parsing the document from the beginning as text/html.

    Also i think a very subtle error notification in IE would go along way in helping people write better code. If I write some bad html code and I don't see any errors I think every thing is all fine and dandy. This is not good and helps contribute to the bad code we find. Something like the little red x you get in the corner with firebug would be a cool idea.

  • Colin Cochrane

    11/12/2007 9:43:36 AM |

    I like that idea about the error notification.  I sometimes take for granted that I have the Html Validator plugin for FireFox so I know right away if a page validates and if not, how many errors their are.  Implementing that kind of functionality into IE would be a good step to raising people's awareness of invalid markup.

  • Adrian Lee

    11/13/2007 1:47:26 AM |

    MS couldn't implement XHTML into IE7 properly because they hadn't been developing IE properly after 6, and suddenly realised they had to play catch up and didn't have the time to fix everything.

    IE6 and 7 are going to be around for a fair while, so XHTML isn't going to be used properly for several more years.  I've not seen anything about ongoing IE development to know what's happening with it, and where in their priorities supporting XHTML is, but there's no garauntee that the next version of IE will even support XHTML.

    In the mean time, HTML5 is in process, and though that's not expect to be completed for a while either, some browsers are already implementing parts of it.
    So XHTML is actually in danger of being ignored in favour of HTML5.  Depending how that turns out...

    And as people are running XHTML as text/html anyway, it's processed by the browser like HTML4 effectively.  If IE7 supporting XHTML served properly would've been a problem as you've said, then we'd already have been seeing those problems in Firefox, opera and other browsers that do support XHTML.
    In order for the web sites to break, the people running them would also have to set them to be served properly as well.

    To be honest, all your post here has done, is restate a 2 year old post on the IE Blog, and add a bit of FUD to the case.

Pingbacks and trackbacks (2)+

Comments are closed