How to Opt-Out of IE8 Standards Mode and Other Useful Internet Explorer Troubleshooting Information

As a web designer/developer, we should strive to make each visitors experience as pleasant as possible. So, whether you like it or not, if you've chosen the web designer/developer career, you have to work with Windows® Internet Explorer® (IE).

I use Microsoft's Virtual PC to test web site display and functionality on various versions of IE (6, 7 and 8 at the moment). Unfortunately, I was experiencing a display issue only in IE8. Now, I realize the number of people currently using IE8 is extremely small. Soon enough though, there will be tens of thousands of people using it right? I might as well try to correct it now rather than pull my hair out later.

Rather than go into the display issue itself, I found a very useful technique to opt-out of IE8 standards mode. Or, in regular terms, how to make IE8 display a web page as if it were IE7.

First, I should explain why I chose this route. For one thing, it quickly fixed the display issue. Is there a better reason?

All I had to do was include a simple meta tag to the page(s) where the problem was occurring.


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

Personally, I like to wrap IE specific tags with a bit of ColdFusion:


<cfif cgi.HTTP_USER_AGENT contains "msie">
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
</cfif>

The downside to using this technique is that you will not be able to use the latest rendering features available in IE8. Sniff, sniff (cue smallest violin in the world) … oh well.

According to information I found on the IE8 Readiness Toolkit, you can also address this on a per-site bases by adding a HTTP header:

X-UA-Compatible:IE=EmulateIE7

Alternatively, you could use a slightly different meta tag on a per-page basis while still accessing "all Internet Explorer 8 has to offer."


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

Word of caution here, using the "EmulateIE7" technique did not fix my display issue though. I ended up using the first technique with "IE=7" to "correct" the problem.

Here are some other helpful links relating to working with Internet Explorer, IE8 (Beta 1), etc.:

Comments

© 2017, Stephen J. Withington, Jr.  |  BlogCFC was created by Raymond Camden – Version 5.9.004

Creative Commons License  |  This work is licensed under a Creative Commons Attribution 3.0 Unported License.  |  Hosted by Hostek.com