IE Version Targeting: A Neutral Perspective

by David Rodriguez — Jan 30, 2008

Recently, there has been a lot of buzz going around about Internet Explorer 8 and plans to include in it a feature called "version targeting." You can scour the net for blog posts and articles about version targeting, but you'll get a lot of debate and several different views on this topic, and it's difficult to pinpoint just the facts.

What is version targeting?

Version targeting is a way to tell Internet Explorer how it should render a page. Right off the bat, you might think: "Oh, a DOCTYPE," or "oh, a conditional comment." No, version targeting isn't quite the same as those methods. Version targeting will actually tell Internet Explorer to use a different version of itself to render a page.

Let's tell a little backstory. When IE6 was the norm, web developers built their pages and sites to look good in IE6. The problem back then that is spurring version targeting today is that IE6 did a poor job of adhering to web standards when rendering HTML and CSS. This, in effect, meant that IE6 was "broken." But developers found many workarounds to get their sites to look good in IE6, and they did so for a long time.

Skip ahead. Internet Explorer 7 is released. IE7 has much better support for standards than IE6 did. That's an improvement, right? Well, yes, and no. Yes, because developers who progressively build their websites with standards and validation in mind now have a much more compliant Internet Explorer - something they'd been wanting for a long time. And no, because now thousands of sites that were built to look good in IE6 suddenly "broke" in IE7 because of the better standards support. (If you're interested in how this type of thing evolved, be sure to check out the links at the bottom of this article for some detailed information.)

This tends to cause problems for you as a web developer when you have to explain to your boss or client why their site looks poor today (in IE7) when it looked fine yesterday (in IE6). And then you need to go in and fix the problem. This can be quite troublesome.

To fix this, IE8 will force itself to render pages like IE7 by default. The only way to make IE8 act like IE8 is to use version targeting in your page to tell it not to act like IE7.

How do you use version targeting?

With an X-UA-Compatible meta tag. Here it is:

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

Note: the meta tag must go in the head of your document. Only other meta tags and the title tag can precede it. All other elements must come after it, or it will not work.

With this tag, you tell IE8 to behave like IE8 and use all of the new standards, tricks, and features that come with it. This should be good for developers that want to make use of all the latest standards in their designs.

Or, you could use this tag:

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

This tag will lock IE8 into rendering the webpage as if it were being viewed in IE7. This should be good if you want to make sure pages will look and function the same in Internet Explorer for many, many years to come without worry of new standards compliance "breaking" your site.

Also, if you leave out the meta tag altogether, IE8 renders as IE7 by default, so the above meta tag is a bit redundant.

There's one more type of X-UA-Compatible meta tag that developers might be interested in: the edge value. Like so:

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

With the edge value set in a document, that page will always use the latest version of Internet Explorer to render the page. This seems to be discouraged by the IE team, but there are some in the community who think this should be the default behavior, rather than the default being IE7 rendering.

Is version targeting good or bad?

There are some pretty strong reactions in the web design community regarding version targeting. As Jeff Croft puts it, there's a war within web standards between pragmatists and purists over this topic.

This is a neutral and informative article, so I won't be disclosing my feelings toward version targeting here. However, I will point you to some of the articles, blogs, and comments that discuss version targeting in detail, and you can form your own opinion. Have a look at the links below.

Del.icio.us Digg Technorati Blinklist Furl reddit Design Float