Read more

About IE's Compatibility mode

Dominik Schöler
June 30, 2016Software engineer at makandra GmbH

IE has a "Compatibility Mode" for old browsers. You can keep IE from offering it (and fix some other things, too) by adding this meta tag to your <head>:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

Or in Haml:

%meta(http-equiv="X-UA-Compatible" content="IE=Edge")

However, there are some things you need to bear in mind:

  • X-UA-Compatible is ignored unless it's present inside the first 4k of you page. If you put it somewhere in the bottom of your head section (or in the body) move it to top. The best place for it is right after encoding and language declarations.

  • X-UA-Compatible is ignored if it's put inside IE conditional comments.

  • Also, you shouldn't have any text before the doctype declaration. If you've got any HTML comments there, for example, the IE will switch to quirks mode.

  • Finally, check if you're viewing this site from the intranet. By default Compatibility View is enabled for Intranet sites.

Posted by Dominik Schöler to makandra dev (2016-06-30 11:23)