The IE7 compatibility tag – Force IE8 to use the IE7 rendering mode

If your site is not rendering properly in IE8, you can force IE8 to use the IE7 rendering mode with the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">

You also transmit this information in the header of the web page response. One way to do that quickly is via a .htaccess file with the following line:
Header set X-UA-Compatible IE=EmulateIE7

You can read more information about IE8 and IE7 compatibility over on MSDN.



Comments

  1. Michael Robbins June 22nd

    Comment Arrow

    can you force ie8 mode only?


  2. d3vlabs July 7th

    Comment Arrow

    .htaccess method probably works fine with apache, but what if im on IIS?

    Im working with an .aspx site that has a bunch of .aspx files laying in the root. i doubt there is master page

    is it possible to do it via web.config or maybe .css?


  3. Larry September 1st

    Comment Arrow

    You can always implement the switch client side with the meta-equiv. However I found the instructions for doing it via headers on IIS here: http://msdn.microsoft.com/en-us/library/cc817572.aspx. Also I haven’t heard of a way to force IE8 rending mode yet.


  4. Joe January 18th

    Comment Arrow

    I’ve tried both and neither work.

    I have to click on the little button that is made available from the above lines of code in order to use compatibility mode.

    Is it true there isn’t a way to FORCE compatibility mode, but simply to enable the option of it?


  5. Stan April 1st

    Comment Arrow

    You can force it to be the default for the page by using a meta tag () – BUT – if a user specfically overrides this in their browser (example: use the Developer Tool bar to change the Document Mode: to IE8 Standards) then there is nothing you can do.

    *SIGH* If IE8 just supported the Chinese Character set like IE6 and IE7 did, I would not even have to worry about this.


  6. System Exam July 1st

    Comment Arrow

    I need browser mode to be IE7 not document mode to be IE7
    The whole world seems to be suggesting document mode to be IE7 not the Browser mode to be IE7


Add Yours

  • Author Avatar

    YOU


Comment Arrow
CommentLuv Enabled



About Author

Larry

A certified PHP developer and architect living and working in Orange County California. Larry specializes in LAMP based platforms and focuses on a wide variety of leading edge web technologies including web service development, AJAX enabled applications as well as Flash based application development.