IE rendering engine: quirks vs strict mode
- Published January 26th, 2007 in Web/W3C, Tips & Tricks
IE’s rendering engine most definitely sucks. It got better with version 7.0 but still far behind Mozilla’s Gecko, KHTML/WebKit or Opera in what concerns to complying with standards. Nevertheless, a lot of people are not aware that despite the fact of being bad, it can be set to be a little better… hang on for the details.
Some years ago Microsoft had to make a decision: stick with the old rendering engine full of patches in order to be backward compatible with prior versions of IE or ignore backward compatibleness and get rid of that clumsy rendering engine in favor of a new one. Their decision was: do both. So, the actual versions of IE, starting with IE 5.5, 6.0 and 7.0 support both rendering engines.
So in IE there’s two rendering modes: quirks and strict. Strict complies with a lot more W3C than quirks mode and will spare you from some frustrating hours of tuning CSS files.
In order to activate the strict type you must have a doctype set on your HTML page. It does not matter if it’s XHTML Transitional or Strict, just make sure it does have a correct doctype set.
This won’t solve IE’s problems with complying with standards but will certainly reduce the amount of time required to make your standards compliant web page work correctly on IE. It saved me a lot of time.




Gecko-based browsers work the same way, to use the “standards mode”, the document has to have a doctype.
Even if IE is in strict mode, some elements in the page can cause it to fall back to quirks mode.
Btw, as pointed by Carlos Rodrigues, Gecko-based engines also have strict and quirks mode… I’m no M$ zealot, but no wonder they are trying to pay bloggers just to be imparcial on Wikipedia — people read, believe and publish too much without enough background check.
Well, there are also other consequences like http://www.joelonsoftware.com/items/2006/12/28.html, but I don’t think that is the case.
JRendeiro,
I don’t have the smallest clue of what has bribing bloggers to do with my post.
What I said is the following: IE rendering engine can be a little better if used properly — ie, in strict mode. It will spare developers’ precious time optimizing for IE. I don’t care if IE, Firefox or Opera have two rendering modes. What I do care is that following some simple procedures you save yourself from trouble.
I start to believe that some people don’t actually read the posts. They read the word Microsoft in the posts and assume bashing. Oh well…
Mário, not only I read your post but I also read the quirksmode.org page you linked. You only talk about IE, as if Mozilla and Opera don’t have quirks mode rendering. That’s why I say you are being biased and that’s why I say “no wonder they [Microsoft] are trying to pay bloggers just to be imparcial on Wikipedia”. http://www.jppereira.com/engrenagem/?p=1175
The quirksmode.org page clearly mentions that fack in the text and shows it in the comparison table.
You are confusing low compliance to standards in IE (wich I totally agree) with that compliance being low *because* of quirks mode rendering.
Err I meant fact, of course… :)
You are confusing low compliance to standards in IE (wich I totally agree) with that compliance being low *because* of quirks mode rendering.
Question being that most of the times the compliance is low because people are not aware to quirks mode. It’s a lot more difficult to apply the W3C standards to the browser while in quirks mode rather than in strict mode. That’s my point!