I have an app that is broke in IE10 but runs fine in IE10 Compatibility View. A quick google results in the
I had the same problem. The problem is a bug in MSIE 10, so telling people to fix their issues isn't helpful. Neither is telling visitors to your site to add your site to compatibility view, bleh. In my case, the problem was that the following code displayed no text:
document.write ('<P>');
document.write ('Blah, blah, blah... ');
document.write ('</P>');
After much trial and error, I determined that removing the <P> and </P> tags caused the text to appear properly on the page (thus, the problem IS with document mode rather than browser mode, at least in my case). Removing the <P> tags when userAgent is MSIE is not a "fix" I want to put into my pages.
The solution, as others have said, is:
<!DOCTYPE HTML whatever doctype you're using....>
<HTML>
<HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
<TITLE>Blah...
Yes, the meta tag has to be the FIRST tag after HEAD.
The X-UA-Compatible
meta
element only changes the Document mode, not the Browser mode. The Browser mode is chosen before the page is requested, so there is no way to include any markup, JavaScript or such to change this. While the Document mode falls back to older standards and quirks modes of the rendering engine, the Browser mode just changes things like how the browser identifies, such as the User Agent string.
If you’d like to change the Browser mode for all users (rather than changing it manually in the tools or through the settings), the only way (AFAICT) is to get your site added to Microsoft’s Copat View List. This is maintained by Microsoft to apply overrides to sites which break. There is information on how to remove your site from the compat view list, but none I can find to request that you're added.
The preferred method however is to try to fix any issues on the site first, as when you don’t run using the latest document and browser mode you can not take advantage of improvements in the browser, such as increased performance.
If you want to set the compatibility mode in the browser itself and not in the html do the following
As shown in the image below. The website should then open up with IE 10 Compatibility view.
You should try the IE 5 quirks compatibility mod (is the default IE10 compatibility view)
<meta http-equiv="X-UA-Compatible" content="IE=5">
important: set in the top of your iframe structure (if you use iframe structure)
more info 1, 2
You can try :
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
Just like you tried before, but caution:
It seems like the X-UA-Compatible tag has to be the first tag in the < head > section
If this conclusion is correct, then I believe it is undocumented in Microsoft’s blogs/msdn (and if it is documented, then it isn’t sticking out well enough from the docs). Ensuring that this was the first meta tag in the forced IE9 to switch to IE8 mode successfully
See here:
https://softwareengineering.stackexchange.com/questions/194687/how-the-compatibility-view-in-ie-works-behind-the-scenes
Use
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10">
I just tried it and it showed IE10 compatibility mode in the debug window.