Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Compatibility View in IE

I am wondering how do you stop people who are using IE 8 from going to Compatibility mode?

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

I found this tag and I think this forces people to stay in IE-8 mode but I am not too sure and can't check as I have IE 9.

If people are in IE 9 mode I force them to not go into IE 8 or IE 7 Compatibility mode?

I tried to put the above line in my code and went to IE 9 -> Tools -> Compatibility View(Grayed Out)

but "Compatibility View Settings" was not grayed out and it seems you could add the site through there.

So should that not disable?

like image 390
chobo2 Avatar asked Jun 14 '11 19:06

chobo2


People also ask

How do I turn off Compatibility View in IE11?

Internet Explorer 11Click Tools in the browser menu bar, and then click Compatibility View settings. Clear the Display intranet sites in Compatibility View check box, and the click Close.

How do I change Compatibility View in IE?

To change your Compatibility View settingsOpen Internet Explorer for the desktop, click Tools, and then click Compatibility View settings. In the Compatibility View Settings box, add the problematic website URL, and then click Add. Compatibility View is turned on for this single website, for this specific computer.


2 Answers

All you need is to force disable C.M. in IE - Just paste This code (in IE9 and under c.m. will be disabled):

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" /> 

Source: http://twigstechtips.blogspot.com/2010/03/css-ie8-meta-tag-to-disable.html

like image 140
FelixFett Avatar answered Sep 24 '22 03:09

FelixFett


This should be enough to force an IE user to drop compatibility mode in any IE version:

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

However, there are a couple of caveats one should be aware of:

  • The meta tag above should be included as the very first tag under <head>. Only the <title> tag may be placed above it.

If you don't do that, you'll get an error on IE9 Dev Tools: X-UA-Compatible META tag ignored because document mode is already finalized.

  • If you want this markup to validate, make sure you remember to close the meta tag with a /> instead of just >.

  • Starting with IE11, edge mode is the preferred document mode. To support/enable that, use the HTML5 document type declaration <!doctype html>.

  • If you need to support webfonts on IE7, make sure you use <!DOCTYPE html>. I've tested it and found that rendering webfonts on IE7 got pretty unreliable when using <!doctype html>.

The use of Google Chrome Frame is popular, but unfortunately it's going to be dropped sometime this month, Jan. 2014.

<meta http-equiv="X-UA-Compatible" content="IE=EDGE,chrome=1"> 

Extensive related info here. The tip on using it as the first meta tag is on a previously mentioned source here, which has been updated.

like image 22
Wallace Sidhrée Avatar answered Sep 26 '22 03:09

Wallace Sidhrée