Force IE compatibility mode off using tags

how to change ie compatibility mode using javascript
force compatibility mode ie 11
disable ie compatibility mode programmatically
meta tag for ie 11 compatibility
meta tag ie compatibility
how to forcefully set ie compatibility mode on from the server-side
force ie to use edge
turn on internet explorer 7 standards mode

I am doing work for a client who forces compatibility mode on all intranet sites. I was wondering if there is a tag I can put into my HTML that forces compatibility mode off.

There is the "edge" mode.

<html>
   <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge" />
      <title>My Web Page</title>
   </head>
   <body>
      <p>Content goes here.</p>
   </body>
</html>

From the linked MSDN page:

Edge mode tells Windows Internet Explorer to display content in the highest mode available, which actually breaks the "lock-in" paradigm. With Internet Explorer 8, this is equivalent to IE8 mode. If a (hypothetical) future release of Internet Explorer supported a higher compatibility mode, pages set to Edge mode would appear in the highest mode supported by that version; however, those same pages would still appear in IE8 mode when viewed with Internet Explorer 8.

However, "edge" mode is not encouraged in production use:

It is recommended that Web developers restrict their use of Edge mode to test pages and other non-production uses because of the possible unexpected results of rendering page content in future versions of Windows Internet Explorer.

I honestly don't entirely understand why. But according to this, the best way to go at the moment is using IE=8.

How to Disable Compatibility Mode in Internet Explorer, is a feature that helps you view webpages that were designed for previous versions of the browser, however having it enabled can break newer sites that were designed for modern browsers. Edge mode tells Windows Internet Explorer to display content in the highest mode available, which actually breaks the “lock-in” paradigm. With Internet Explorer 8, this is equivalent to IE8 mode.

Use the Meta Tag to Ensure Future Compatibility, The following code example demonstrates how to force a webpage to be rendered in Internet Explorer 8 mode. HTML Copy. <html>  Site owners can choose to use the X-UA-Compatible tag to be absolutely declarative about how they’d like their site to display and to map Standards mode pages to IE7 Standards. Use of the X-UA-Compatible tag overrides Compatibility View on the client.

If you're working with a page in the Intranet Zone, you may find that IE9 no matter what you do, is going into IE7 Compat mode.

This is due to the setting within IE Compatibility settings which says that all Intranet sites should run in compatibility mode. You can untick this via a group policy (or just plain unticking it in IE), or you can set the following:

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

This works (as detailed in other answers), but may not initially appear so: it needs to come before the stylesheets are declared. If you don't, it is ignored.

IE - disable compatibility mode for intranet sites - General, If I uncheck “display intranet sites in compatibility mode” in IE, it displays fine. You cannot have duplicate meta tags with same “http-equiv”, plus you only so I'​m trying to find a way to force compatibility mode OFF for Internet Explorer… This document describes various mitigation techniques and configurations to get the best rendering in Internet Explorer. It is especially powerful when embedded in Adobe Campaign Console. The main idea is to avoid IE rendering in compatibility mode (IE 7 look). Digital Marketing Solution(s) Adobe Campaign v6.1 from build 8021 Adobe Campaign v6.11

As suggested in this answer to a related question, "edge" mode can be set in the Web.Config file. This will make it apply to all HTML returned from the application without the need to insert it into individual pages:

<configuration>
    <system.webServer>
        <httpProtocol>
            <customHeaders>
                <add name="X-UA-Compatible" value="IE=edge" />
            </customHeaders>
        </httpProtocol>
    </system.webServer>
</configuration>

This same step can also be accomplished by modifying the "HTTP Response Headers" using IIS Manager for the IIS server, entire website, or specific applications.

Force IE to View a Page in Compatibility Mode, You can also use meta tags to force standards mode. The X-UA-Compatible meta tag tells Internet Explorer what view mode to use or emulate. Force IE compatibility mode off using tags (8) I am doing work for a client who forces compatibility mode on all intranet sites. I was wondering if there is a tag I can put into my HTML that forces compatibility mode off.

I believe this will do the trick:

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

X-UA-Compatible Meta Tag Information, The X-UA-Compatible meta tag helps render Web pages in older IE browsers. One way you may do this is by using X-UA-Compatible mode. compatibility view but the DOCTYPE declaration should force it to be rendered  We use the following to force IE to open in the latest mode: But for some case we need to force IE to open site in Compatibility mode. Like when user opens the site in IE10, it should open in IE10 Compatibility mode. When user open site in IE9, it should open in IE9 comptibility and so on for IE8.

How to avoid Internet Explorer rendering in compatibility mode, The main idea is to avoid IE rendering in compatibility mode (IE 7 look). Some pages contained the following meta tag but it did not always work due to tedious IE heuristics, mostly using the console. The http X-UA-Compatible header does not apply, and the embedded IE forces compatibility mode. I have ran into a slight issue with IE 7/8's compatibility mode. I need to force this off for users viewing my Drupal site. I found what I believe to be a fix, however I am unsure how to implement this change. The solution found is the meta tag: meta http-equiv="X-UA-Compatible" content="IE=edge" How can I place this change into the head of each of the pages on my site?

Should we force IE compatibility mode off? · Issue #1034 · alphagov , I'm not sure the meta tag will entirely “force” compatibility mode off. seems to confirm that having the tag would help any users using older IE. If your enterprise primarily uses Windows Internet Explorer 9 or Internet Explorer 10, start testing using the various document modes. Because you might have multiple versions of IE deployed, you might need to use both Enterprise Mode and document modes to effectively move to IE11.

How to turn off compatibility View / Mode in Microsoft IE10 and IE11 , A minimum of Internet Explorer (IE) 10, Firefox 9 or Chrome 14 is required". When using IE 10 or IE 11 to access GMS or Analyzer, do not run in Compatibility View​  Windows Internet Explorer 8 enables you to control document compatibility modes, so you can instruct the browser to render webpages in the same way as older browser versions. You can also choose when to update the webpage, while it continues to be usable and function correctly.

Comments
  • I think that the answer you are looking for is here : stackoverflow.com/questions/1014666/…
  • Actually I was looking for the exact opposite, who sets their standard to compatability mode, thats just insane.
  • Bad javascript on a legacy app that crashes on anything other than IE7, that's who sets their standard to compatibility. One day, we'll get around to replacing it...
  • related stackoverflow.com/questions/6771258/…
  • @icedwater I left the company over 6 years ago :) We made small improvements to remove the issues whenever we had a change in the same area, but tech debt was never prioritised there. Don't know if it ever got fixed in the end.
  • As of 8/6/2012 Microsoft appears to be using IE=10 on their own sites. If you've tested your site in IE10 (preview version), it's safe to use this; otherwise, you may want to stick to IE=9 for now.
  • I have found that this does NOT work if the user (or the sysadmin) has turned on compatibility mode as a default by going to Tools->Compatibility View Settings, and checking Display all websites in Compatibility View. To fix the problem, I have to return the header in the HTTP response: X-UA-Compatible: IE=edge
  • +1 to speedplane - IE10 compatibility mode is ON by default for intranet sites - UGH...thanks for the find!
  • Word of advice for those who find this answer, but are unable to get it to work for them. The compatability meta tag MUST be the first meta tag, and there can be NO IE conditional statements before the tag. More: tesmond.blogspot.com/2011/10/…
  • Thank you Chris! I was struggling with this for 30 minutes when I finally read your comment. I didn't have it first.
  • thanks for the warning about the stylesheet, this was causing problems and i know the reason now!