IE8 opt-in: no problem after all?

Warning This article was written over six months ago, and may contain outdated information.

After two days of com­mo­tion regard­ing the Inter­net Explor­er team’s deci­sion to include a stan­dards opt-in in the next ver­sion of their brows­er, Mozil­la’s John Resig has noticed some­thing rather impor­tant in an exchange on IE’s Chris Wilson’s blog; name­ly:

Inter­net Explor­er 8 will sup­port DOCTYPE switch­ing for new DOC­TYPEs (like HTML5).

What that means is, if you use the (very sim­ple) HTML 5 DOCTYPE in your documents:

<!DOCTYPE html>

Your brows­er will auto­mat­i­cal­ly ren­der in stan­dards mode. Even IE8. The META switch will only be required for pages using cur­rent­ly exist­ing DOCTYPEs.

That’s good news. Even bet­ter news is that all mod­ern browsers (and IE6) sup­port the HTML 5 DOCTYPE and so you can start using it today if you wish. The only slight down­side is that the W3C’s Val­ida­tor does­n’t recog­nise it, and so will report that your pages are invalid.

I think it’s per­haps too ear­ly to start using this already, but it’s good to know that the option is there; and, as John says, it would have saved a lot of fraz­zled nerves if the IE team had made this clear­er upfront.

3 comments on
“IE8 opt-in: no problem after all?”

  1. Well, the prob­lem is that (as you say) it’s still too ear­ly to start using HTML5 on pro­duc­tion sites for cus­tomers. The spec’s by no means finalised even if we do have a work­ing draft.

    Hav­ing said that, for per­son­al sites this is fine, and cer­tain­ly bet­ter than the alter­na­tive of brows­er-spe­cif­ic cruft.

  2. Appar­ent­ly, the same will go for pages served as “application/xhtml+xml”. That means that as an alter­na­tive, we could use a con­di­tion­al com­ment to serve pages as “text/html” to IE<=7, and serve “application/xhtml+xml” to every oth­er browser.

  3. I for­got to state some­thing impor­tant: XHTML sup­port still has­n’t been con­firmed in IE8 yet. (But I think they’ll add it)
    Any­way, what I said above should still work when­ev­er IE sup­ports XHTML, whether it is in ver­sion 8 or later…