How to Avoid Ie8 Compatibility Button

How to avoid ie8 compatibility button?

Short answer:

Put this in your head tag to tell the browser that your page works in IE 8:

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

Also as per Jon Hadleys comment, to ensure the latest (not just IE8) rendering engine is used, you could use the following:

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

How do I disable compatibility mode in Internet Explorer 8 for my website?

You can do it as a tag or as a setting in IIS (with the tag), set to IE=EmulateIE8

Is there a way to disable compatibility mode in IE8, if already enabled?

I ended up just detecting the compatibility mode and then nagging the user. At least Google Plus does this.

Force IE compatibility mode off in IE using tags for browser mode

You want IE=edge, it will force the browser to use the latest version it has (IE8 will act as IE8, not compatibility mode) and removes the button for compatibility mode. This will give the best results for AngularJS

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

Also, if you are running the site locally, IE will pick up on that and force compatibility mode on. You can change this setting in IE, go to Tools –> Compatibility ViewSettings -> Uncheck "Display intranet sites in Compatibility View".

Sample Image

Force IE compatibility mode off using tags

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.



Related Topics



Leave a reply



Submit