Why Does Ie9 Switch to Compatibility Mode on My Website

Why does IE9 switch to compatibility mode on my website?

Works in IE9 documentMode for me.

Without a X-UA-Compatible header/meta to set an explicit documentMode, you'll get a mode based on:

  • whether the user has clicked the ‘compatibility view’ button in that domain before;
  • perhaps also whether this has happened automatically due to some other content on the site causing IE8/9's renderer to crash and fall back to the old renderer;
  • whether the user has opted to put all sites in compatibility view by default;
  • whether IE thinks the site is on your intranet and so defaults to compatibility view;
  • whether the site in question is in Microsoft's own list of websites that require compatibility view.

You can change these settings from ‘Tools -> Compatibility view settings’ from the IE menu. Of course that menu is now sneakily hidden, so you won't see it until you press Alt.

As a site author, if you're confident that your site complies to standards (renders well in other browsers, and uses feature-sniffing to decide what browser workarounds to use), I suggest using:

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

or the HTTP header:

X-UA-Compatible: IE=Edge

to get the latest renderer whatever IE version is in use.

Why does IE9 change to Compatibility View mode automatically?

Intranet sites by default are loaded in compatibility mode by default.

You need to use a X-UA-Compatible meta tag to achieve what you want in intranet sites without change IE settings.

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

Since you making it compatible with IE9 looks like you are using many Web Standards. So I reccomend you say do IE to use the newer engine available instead of just fix it to IE9:

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

In this case if you are using IE10 or IE11 (currently in preview) it will use their best engine instead of always IE9.

More information about Specifying legacy document modes.

Why does IE9 give the option to render in compatibility mode

Ok finally managed to get rid of compatibility mode icon from IE9. Id tried putting the meta tag in various position within the code. But always seemed to have the option to run in compatibility mode.

But adding the following to the .htaccess file soloved it for me.

Header set X-UA-Compatible "IE=edge"

Internet Explorer automatically switches to compatibility mode (IE9 and IE10)

In my case, it happened due to some CSS using Type 1 font (Helvetica).

Internet Explorer changed its font-rendering from IE9 (affects IE10 as well) which does not support the old Type 1 fonts. But still some users manually install fonts (for me, it was Helvetica, tested on Windows 7, IE9 and IE10 both).

Now if you use CSS like:
font-family: Helvetica, Arial, sans-serif;
rather than falling back for Arial, IE9 and IE10 switch to compatibility mode.

More details can be found at: http://bobbyjoneswebdesign.blogspot.com/2011/12/internet-explorer-9-type-1-font-bug.html

As per the mentioned blog post, following approaches would help resolve the problem for the web developers:

  • Don't use Helvetica or other non-standard fonts in your CSS
  • Use a substitute web font with the CSS @font-face feature to serve up your desired fonts
  • Use an online web fonts service like webfonts.fonts.com
  • Use Conditional Comments to create IE9 specific stylesheets.

Tell IE9 to use compatibility mode?

The syntax for compatibility mode is:

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

The content attribute specifies the mode for the page; to mimic the behavior of Internet Explorer 7, specify IE=EmulateIE7. Specify IE=5, IE=7, IE=8 or IE=9 to select one of those compatibility modes. You can also specify IE=edge to tell Internet Explorer to use the highest mode available.

Understanding Document Compatibility Modes

Internet Explorer supports a number of document compatibility modes that enable different features and can affect the way content is displayed:

  • IE9 mode provides the highest support available for established and
    emerging industry standards, including the HTML5 (Working Draft), W3C
    Cascading Style Sheets Level 3 Specification (Working Draft),
    Scalable Vector Graphics (SVG) 1.0 Specification, and others.
  • IE8 mode supports many established standards, including the W3C
    Cascading Style Sheets Level 2.1 Specification and the W3C Selectors
    API; it also provides limited support for the W3C Cascading Style
    Sheets Level 3 Specification (Working Draft) and other emerging
    standards.
  • IE7 mode renders content as if it were displayed in standards mode by
    Internet Explorer 7, whether or not the page contains a <!DOCTYPE>
    directive.
  • Emulate IE9 mode tells Internet Explorer to use the <!DOCTYPE>
    directive to determine how to render content. Standards mode
    directives are displayed in IE9 mode and quirks mode directives are
    displayed in IE5 mode. Unlike IE9 mode, Emulate IE9 mode respects the
    <!DOCTYPE> directive.
  • Emulate IE8 mode tells Internet Explorer to use the <!DOCTYPE>
    directive to determine how to render content. Standards mode
    directives are displayed in IE8 mode and quirks mode directives are
    displayed in IE5 mode. Unlike IE8 mode, Emulate IE8 mode respects the
    <!DOCTYPE> directive.
  • Emulate IE7 mode tells Internet Explorer to use the <!DOCTYPE>
    directive to determine how to render content. Standards mode
    directives are displayed in Internet Explorer 7 standards mode and
    quirks mode directives are displayed in IE5 mode. Unlike IE7 mode,
    Emulate IE7 mode respects the <!DOCTYPE> directive. For many web
    sites, this is the preferred compatibility mode.
  • IE5 mode renders content as if it were displayed in quirks mode by
    Internet Explorer 7, which is very similar to the way content was
    displayed in Microsoft Internet Explorer 5.
  • Edge mode tells Internet Explorer to display content in the highest
    mode available. With Internet Explorer 9, this is equivalent to IE9
    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. Those same
    pages would still appear in IE9 mode when viewed with Internet
    Explorer 9.

Because edge mode documents display webpages using the highest mode available to the version of Internet Explorer used to view them, it is recommended that you should only use this document mode for testing purposes only. Do not use it for production uses.

For more information on IE compatibility mode, check this out.

Stuck with IE compatibility mode

If the site is on Microsoft's compatibility view list, you'll need to get them to remove it.

According to this page, you need to email iepo@microsoft.com with the following information and ask that your site be removed from the list:

  • Owner Name
  • Corporate Title
  • Email Address
  • Telephone Number
  • Company Name
  • Street Address
  • Website Address


Related Topics



Leave a reply



Submit