By Matthew Magain

IE8 Standards Mode Is Opt-in

By Matthew Magain

Microsoft have reversed this decision; IE8 will now choose standards-compliant mode by default.
Chris Wilson confirmed today on the IEBlog that for a site to render in standards-compliant mode in IE8 it will need to include a specific meta tag:

  1. “Quirks mode” remains the same, and [will stay] compatible with current content.
  2. “Standards mode” remains the same as IE7, and [will stay] compatible with current content.
  3. If you (the page developer) really want the best standards support IE8 can give, you can get it by inserting a simple meta element.

The meta tag, also documented by Aaron Gustafson in the latest issue of A List Apart (with careful justification and support) looks like this:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

While I concede that, in order to retain backwards compatibility with the sites of yesterday (and of five years ago), opting in to render a page in standards-mode in IE8 seems the only sensible option, one thing really irka me about this approach:

Hardcoding a reference to a specific browser as a necessary part of the page’s markup feels plain dirty.

It’s one thing to specify a character encoding or the language used by the page, but the agent with which it is compatible? Fundamentally and philosophically it just makes sense for a page to be completely browser-agnostic. In fact, the sheer mention of a browser in a page could be interpreted as a geek form of advertising, while other browsers pay the penalty for being better at adhering to the W3C specs. Will other browsers follow suit, such that web developers find it necessary to write something like this?

<meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;Opera=9;Konqueror=3;Safari=3..." />

Still, I guess it beats using conditional comments.

  • It’s just a new way for IE to keep you enslaved …

  • webtechnepal

    hmm yeah!! agreed with “brothercake”.

  • TheAnarchist

    My first reaction is to agree with Matthew; hard-coding a browser into a web page does feel a little dirty. But one should not settle on one opinion until they learn everything about something.

    1) With this new tag and IE 8, am I able to specify and have IE 8 render the page as if it were being viewed in IE 6?

    2) With this new tag and IE 8, am I able to specify and have IE 8 render the page as if it were being viewed in FF 2?

    3) With this new tag and any browser which supports this META tag, am I able to specify and have my preferred browser render the page as if it were being viewed in Browser X?

    Unless each of those three scenarios are accommodated for, I will not be liking this new META tag. What I would absolutely approve of, however, is an agreement between browser developers upon how a standard should be rendered (let’s ignore quirky websites for now) – and then for those browser developers to ask web developers to use or similar.

    That said, if all browsers agreed upon a single rendering of standards, we wouldn’t need such a tag – any web page that didn’t comply with standards would be rendered in quirks mode anyway, and any page that did would be rendered identically in every browser (because every browser would have the same rendering standards).

  • Still, I guess it beats using conditional comments.

    But conditional comments include the browser’s name in your page too. ;)

    And I can’t see this meaning that the use of conditional comments will disappear. You’ll still probably need them for your pages to work in IE6 & 7 and may still need them for future versions, depending on how good a job MS do.

  • madr

    In a perfect world, web sites without the meta element would render really, really standards mode, leaving the meta element as a quickey to fix broken pages relying on previous IE6 bugs. These developers, which generally don’t give a damn about web standards, will then have a better option than fall back on quirksmode or fix their HTML/CSS “bugs”.

  • Microsoft are saying that they do this in order not to “break the web”, in other words, don’t break the web that Microsoft broke – badly – by ignoring web standards for more than 10 years.

    They cause the problems and expect us to fix those problems for them.

    I can accept doctype switching and a quirks mode that caters to web pages that were created long before there were any coherent standards. Many of those old pages will never be updated, yet some of them contain valuable information.

    But now Microsoft insist on catering to badly coded pages that were created recently, when there was no real excuse for doing so. I understand the idea that anyone should be able to publish on the web without having to be an HTML/CSS guru. But is it really that far-fetched to ask that a web author at least learns a little bit?

    Of course a large part of the blame falls on authoring tools that generate bloated, unsemantic, non-compliant markup and CSS. Tools that allow people to publish web pages without knowing anything about HTML and CSS should at least guarantee valid and compliant output, even if semantics is more difficult.

    I, for one, don’t feel like doffing my cap, kneeling before IE and begging ‘pretty please!’ to make it follow the recommendations that Microsoft themselves have agreed upon.

  • 1) With this new tag and IE 8, am I able to specify and have IE 8 render the page as if it were being viewed in IE 6?

    2) With this new tag and IE 8, am I able to specify and have IE 8 render the page as if it were being viewed in FF 2?

    3) With this new tag and any browser which supports this META tag, am I able to specify and have my preferred browser render the page as if it were being viewed in Browser X?

    No, no and no. And it’s not a new tag either :)

  • issesi sagawa

    Maybe everyone should use this IE8 and not be a problem for the internet?

    Love Issesi x

  • Confused

    What is wrong with rendering the document in standards mode when a DOCTYPE is declared? As I understood it, that is why the DOCTYPE declaration was created.

  • Sojan80

    What I still don’t get though, and what no one has yet to satisfactorily explain is why we need “to retain backwards compatibility with the sites of yesterday (and of five years ago)” or for that matter to explicitly define what it is they mean to be “backwards compatible.”

    It certainly can’t be for their visual aesthetic, and if it were, make a screen capture and be done with it, otherwise there’s a browser archive where you can download every version of more browsers than I’ve ever heard of. Therefore it must be because they contain content, or links to content someone might historically find worthwhile.

    Well, text can be scraped as the bevy of screen scrapers out there proves so we can scrape the text off these older sites and store it in something like an XML document.

    Now you’re likely to argue “These pages are historically significant! Therefore, they must be preserved just as they are!” To whit I’d reply “Buffalo cookies!” Again, its the content that’s important, and as long as that content is made available in a useable format such as an XML document then you’re set. If its images, those can be saved and stored in an XML file too, and if images can I’m fairly sure waves can.

    So why all this falderall about “backward compatibility”? It’s just not needed. Even if you take Aaron’s example of a bank application, if a dot upgrade to a browser (or a full version upgrade after five years of absolutely nothing) completely renders a web application inoperable that is one thing, and most likely caused by either poor program design or a flawed implementation of the spec by the browser manufacturer.

    Both would be easy to catch if you do beta testing of your application across a variety of browsers. And, if you’re an online banking application then it stands to very good reason you’d not only have the money to be able to afford to do browser testing, you’d be very motivated to do beta and browser testing so you can continue to make money.

    But if it just slightly changes the physical location of a form element, and does not actually break the form by making it unusable, then so be it, resources are cheap right?.

    Wrong! Chances are the development team for that banking application have known that a new version of browser “X” was hitting the web in “February 20XX” and would download it and test their app on it before it went out as full version upgrade or security download.

    But, regardless of if you think version locking is a good idea or a bad one, the fact remains that much needs to be debated and that debate should include developers, the W3C, WaSP, and LASTLY the browser manufacturers.

    But, I won’t get into that here. I think version targeting is wrong and just a bad idea because there is just too much ambiguity and before anyone goes forcing a meta tag hack down our throats there needs to be much serious debate on this issue.

  • I’m amused that MS/IE team didn’t cop much flack for blatantly lying about IE8 passing the Acid 2 test.

    If you have to modify the test, you don’t pass the test.

    Regardless of any claims or promises they make, compatibility with past mistakes is what makes Microsoft M$. It’s a deeply embedded part of their development culture and business strategy that will not leave them.

  • Maruis

    Yeah, why not just look at the doctype to figure out if they should quirk or not. Come on MS, you can do better…

  • Anonymous

    What’s wrong with just using a DTD in my documents, why do I have to add a meta tag. Does this mean IE will not honour my standards without this tag?

  • Aedus

    What this tells me, is they expect the Web Developers of yester-year to have incorrectly used the strict DOCTYPE while making webpages that worked on MS IE < 8. That is why they are not using DOCTYPE switching. From their point of view, MS IE STRICT is its own rendering standard.

    And andrew.k has a point, at no time did I read or see anything about the ACID2 meta information being changed specifically for IE8 to render…

  • mmj

    Given that quirks modes are here to stay, this is a much better solution than the DOCTYPE switching that Microsoft used with IE6. That was using the document type declaration for a purpose for which it was never intended. It was based on the assumption that anybody who stated a document type cared enough about having their code interpreted in a standards-compliant manner, whatever the document type (even HTML 3.2!).

  • ProfessorDino

    In your email post, you wrote:

    If you wish to avoid adding a tag to all of your pages, you can instead configure your web server to send the same information as an HTTP response header, though if history is any guide, the tag will be by far the preferred mechanism.

    What is the “history” behind this, and why is preferred?

  • ProfessorDino

    In your email post, you wrote:

    If you wish to avoid adding a tag to all of your pages, you can instead configure your web server to send the same information as an HTTP response header, though if history is any guide, the tag will be by far the preferred mechanism.

    What is the “history” behind this, and why is <metagt; preferred?

  • Steve

    I believe they have a way (via registry) to tell the browser to render using the standards compliant engine, thus they were able to get it to pass the Acid2 test without modification.

  • Steve

    tags are often preferred as they can be changed in the code per page whereas the http header has to be changed in the server configuration.

  • Dave Rayner

    It looks like we need to add more code to our pages with each IE release. Although, I think this about as good as microsoft could do – rock and a hard place stuff.

    Their bosses tell them to ‘make it backwards compatible or die’ while their peers (and no-doubt a little voice on their shoulder) proclaims the ‘truth and justice’ of standards compliance rendering.

    So, when I have to worry about IE8, I will add the *new* meta tag, then add another Conditional Comment. mmm.

    At least we are heading in the right direction right? I no longer worry about IE5.X (and the games it played), so in a few years we won’t worry about IE6… and so on. It’s just a shame Microsoft needs to lug that Legacy ball-and-chain around, slowing things down. Call me optimistic (today at least).

  • Steve

    Reading some of the other blog entries and information on the Web Standards site, it appears that Microsoft did not make this decision entirely in a vacuum, but rather sought out help from standards groups in making the decision to go this route. There aeems to be a lot of agreement among standards members that DOCTYPE is not an adequate mechanism at this point for specifying to use standards compliance in a browser rendering engine, at least not with existing usage of it and non-compliant development tools mis-using it. Perhaps the problem is less Microsoft and more ubiquitous non-compliance / mis-use of standards. Part of the problem with standards is that they are released before there are compliant tools available to generate them and no real teeth to ensure that usage requires compliance. Microsoft is not forcing anyone to do anything – websites can still leave the tag out and only target “standards compliant” browsers, or continue to use conditionals and spaghetti code to make their sites cross-browser compatible. Of course reality dictates that most sites will rather opt to add the simple proposed meta-tag line of code (which, by the way, does not violate any standards).

  • felgall

    It is interesting that the Acid3 test specifies that browsers are required to pass the test using their default configuration. Presumably this is as a result of IE8 only passing the Acid2 test when changes to its default configuration are made. Having a valid Doctype at the top of a document is a part of the standards and so testing for it is reasonable even though it would be more reasonable to actually read the file and render the page in accordance with the doctype rather than just checking if the doctype exists. Having an extra tag to identify which standards to support is superfluous particularly since when IE8 first comes out the vast majority of IE users will still be using IE7. By the time that IE7 and earlier users are a small enough group to ignore there will be so many billions of web pages without the IE8 tag that updating to use the IE8 standard mode would be pointless.

    People coding to the standards use those standards that work in current browsers. Apart from hacks for IE6 and earlier there is no real need to use any non-standard code (and those codes can be better handled using conditional comments). There is therefore no need for an additional mode for future web browsers that isn’t already adequately covered by the doctype.

    Conditional comments are not intended for distinguishing between IE and other web browsers. That is just another case of something intended for another purpose being used to fix things for IE. Conditional comments are there to identify which version of which Microsoft programm that their pseudo HTML used for transferring between programs are supposed to read which parts of the code.

    <![if MSO]>Microsoft Word will read this<![endif]>

  • akayani

    Surely if IE8 is standards compliant then all that is required is for it to NOT read conditional comments which were used to make corrections for the older IE versions.

    Then, at least as far as my created pages are concerned, it would get what Firefox gets and there would be no difference.

    I’ll bet anyone $10 that IE8 fails to match Firefox and all we web designers will get from this is another MS browser that needs conditional comments to match the standard that Firefox sets.

    What really sux is that Apple didn’t use the Gecko engine for Safari. So now we have 3 major implementations that have quirks when we could have just had Firefox (Gecko) and IE the moving target.

    Oh that’s right Safari and Firefox match (COUGH) if only.


  • sharpize

    Image in ten years time when we have 40 odd versions of different browsers to support. Microsoft is never going to lean the way its competitors do because its the market leader and wants to make their lives difficult in order that it maintains its market share.

    With broadband steadily creeping into every home in existence we’ll end up designing one whole page as an image and another whole page just as text. As for email code … bah, its going backwards!

    … not a happy bunny.

  • Mark Steven

    It does seem strange that IE8 will default to “quirks mode” rather than “standards mode” as I’d expect, and stranger still that the DOCTYPE declaration won’t do the job. Presumably there is a reason for this (and I don’t mean the old Microsoft are just a bunch of imperialist arguments) and I’d be interested to hear it.

    Anyway I’m delighted that there will be (in theory at least) a simple way of getting IE to display pages as they were intended to be displayed, without recourse to CSS hacks and head-scratching.

  • Anonymous

    So.. we have a self imposed hack from MS.. it’s still a hack. setting the standard to use on a web page should just be a matter of using the DOCTYPE.

  • Mike

    As I read, I might click on the page – a bit like putting one’s finger on the printed version. On this site there is a stupid, gimmicky popup that comes up if I so much as click anywhere on the page. And you SitePoint people have the temerity to discuss HTML compliance standards?!!

  • tgoyer

    Good grief. It’s one tag. The sky isn’t falling. If all I have to do is add one tag to my page and I don’t have to code all those retarded CSS hacks, then I’ll put the tag in.

    At least Microsoft is making an effort at getting it right. They aren’t going to get the ship righted in one swoop, it’s going to take a bit. Cut them some credit for trying to do it right. This is just another case of biting the hand that feeds you. I guess I can’t expect FireFox Fanbois to acknowlege the fact that they are trying.

  • Dan

    It’s time for developers to start telling MS what’s expected instead of MS delivering (as usual) a half-baked solution. Any company with a standards track record this pathetic has no business trying to influence how anyone’s code should look in a browser.

    Over 200 documented CSS bugs in IE6, new ones still being discovered in IE7, and now we’re supposed to just “accept” their IE8 multi-part band-aid hack? Please Microsoft, go develop some more accounting widgets or something, and leave the standards interpretation to the W3C and the open-source companies who actually care about them.

  • akayani

    “Good grief. It’s one tag. The sky isn’t falling.”

    Why do they need any tags? That is the point. I think we are going to discover that it isn’t the compatible browser that it’s being hyped up to be.

    A one tag can be a very big pain in the arse if you have multiple sites with heaps of pages. Not to mention all the email traffic it’s going to cause.

    “Why don’t my web pages work for IE anymore?”

    “They need to be updated for IE8 about $2000 for your site.”

    “I’m not paying that explain to me why I should.”

    Who need it!


  • linux_mike

    All this is well and good…

    But it is not the HTML rendering that is broken. It is the CSS rendering.

    I have just settled nicely into a hack method which allows me to keep all my hacks for IE CSS rendering in a separate CSS file (@import hack).

    Why doesn’t IE supply it’s hacks in a CSS fix, not an HTML fix. Declare the CSS model supported, not the HTML model and don’t fix it in the (X)HTML code fer chrisake!

  • Drew

    I have been coding for a few years now. I am taking a website developement course and I also read a lot of stuff on w3schools and w3c. I have coded by the standards and have always seen IE having issues dislaying my code in one form or another. I think that IE should just suck it up and start building their browsers to display web compliant code. I was a little annoyed that I had built a site that displayed great in FF just like i coded it to and not so bad in Safari and Opera. Then when i viewed it in ie 6 and 7 it was broken. I also had a site that worked fine in all browsers other than IE 7. You have to ask. Is Microsoft building there browsers for Use on the web or just another program to add into their many other problematic programs.

  • I just can’t get upset at Microsoft anymore. To me it seems like they’re doing exactly what developers want them to, namely whip IE into line with respect to standards.

    They’re a huge company and huge == slow for various valid reasons. All I know is IE is way less of a pain than it used to be and it seems to be continuing on that trend.

  • akayani

    I’m a bit feed up with my clients thinking I’m either a perfectionist wanker or trying to rip them off or that I don’t know what I’m doing when after they have seen their site work perfect in FF I tell them it will take another week to test and correct it for IE5 IE5.5 IE6 IE7 AND Safari. Who here would even give a damn if you could justify $100+ a hours to frig about because MS think they know best. I don’t know anyone who codes web pages that wouldn’t shoot the IE team and destroy the browser if that were possible. You watch even with all this hype it won’t match FF. It will just be yet another browser from MS that has to be hacked into standards compliance. At least it has a hack not like Safari where you have to keep tricking up the CSS till you get a compromise that works kinda with Firefox. They all need to grow up and use one common engine and put their collective development efforts into a single task. Nothing stopping MS from adding Active X or whatever weirdo extras they want on top of that.


  • akayani

    Here is a funny take on this issue…


  • mistycabal

    It’s the most ridiculous thing I’ve ever heard of – but then again, it comes from Microsoft and they are the king of coming up with backwards solutions.

    I can just imagine the blank looks on someones face when I try to explain that … well, IE8 isn’t going to act like IE8 unless I specifically ask it to, otherwise it’s going to act like IE7.

    How backwards can you get?

    If MS insists on including this more modern take on the old browser sniffing – then they could at least do it in a way that makes sense…. meaning how about IE8 will act like IE8. Then, if it breaks a site of a lazy developer and that developer decides not to fix it, then they can just toss in the meta tag so their site renders like IE7 instead.

  • akayani

    Imagine that crap they are going to spew out for OOXML. Microsoft or is that Microhoo or Yasoft – for lemmings.


Get the latest in Front-end, once a week, for free.