Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force IE compatibility mode off using tags

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.

like image 950
Al Katawazi Avatar asked Aug 10 '10 13:08

Al Katawazi


People also ask

How do I turn off compatibility mode in IE?

To turn off Compatibility View, click the gear icon on the top right of your browser, then click Compatibility View settings. If KnowBe4 is listed under the Websites you've added to Compatibility View list, click Remove to remove it, then click Close.

How do I force compatibility mode in ie11?

Open up Internet Explorer (IE 11) Press the Alt key on your keyboard, this will make a menu bar appear. Click on the Tools menu tab. Select the Compatibility View settings option.

How do you set IE compatibility mode in HTML?

IE=11: This mode provides the highest support for established and emerging industry standards, like HTML5, CSS3. IE=edge: This mode instructs Internet Explorer to display content in the highest mode available. IE=EmulateIE7: Works same as IE=7 mode if a valid <!


1 Answers

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.

like image 153
Pekka Avatar answered Nov 24 '22 01:11

Pekka