Posted on

how internet explorer 8 decides how to render your page

i’m quick to admit that everything microsoft has been doing lately to apologize for the last decade or so of blatent disregard for what’s going on on the web has been pretty cool. however, the way internet explorer 8 determines how to render your page’s content reminds me of years past when microsoft wouldn’t even provide you with the same basic document model as everyone else.

remember when we had to write a dozen different browser checks in our javascript functions just so our code wouldn’t completely destroy the page in one of microsoft’s horrid versions of ie? remember when in some situations we had to check the browser version on the server side and hand back a completely different document? well a lot of that has gone away. you could even say most of the insanity is over.

with the advent of javascript libraries like prototype.js and jquery, a lot of the bullshit is behind us where scripting is concerned. for the most part, ie has been playing nice since the later revisions of ie6. but now we have a whole different problem. now we have this stupid proprietary meta tags we have to stick in there just to make sure it renders like it should have all along.

here are some of the possible values for the meta tag:

<!-- tell ie8 to use a specific compatibility mode -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE5" />
<!-- or tell it to use the highest one possible.. maybe 9 soon? -->
<meta http-equiv="X-UA-Compatible" content="IE=100" />

first, let me make it clear that simply being able to emulate ie5 is just mind numbingly useless. why anyone would want to render their page like the king of quirks mode is beyond reason. but wait, it gets worse. the process that the browser has to go through to figure out how it should render your page is so complicated that msdn released a flowchart that won’t completely fit in your browser window.

the very first thing it checks is what you as the user has selected in your developer tools. that part makes sense. immediately after that, it should check the doctype declaration but it doesn’t. instead it looks for our favorite new meta tag. if that isn’t there, it looks for a header sent back by the server, then it jumps through a half dozen compatibility view options that the user can set manually, then when all other delay tactics have been exhausted, it finally checks for the docttype.

a numbered list for future reference:

  1. meta tag with compatibility settings
  2. additional header from the server with compatibility settings
  3. the user’s preferences
  4. at long last, the doctype declaration
  5. oh teh noes, no doctypes, going into quirksmode

so the only way to get ie8 to stop and read the doctype immediately and do what it should do to begin with, we have to either hack the server configuration or add in the meta tag.

this is just all wrong. the doctype should be the first thing checked, not the last. we shouldn’t have to manually tell the browser to stop acting like a dumbass and follow the standards that the great and powerful internet council has set before us as a guide. don’t get me wrong. i’m glad microsoft is apologizing and trying to fix the intarwebs that it broke, but this seems a lot like regression more than progression.

One thought on “how internet explorer 8 decides how to render your page

  1. Internet Explorer 8 is very good because it is as stable as Opera. I hate the previous versions of IE like IE6 because it hangs frequently. `

Leave a Reply

Your email address will not be published. Required fields are marked *