Forcing compatibility mode IE not working - html

I need to display a webpage in compatibility mode. I've tried the following tag:
<meta http-equiv="X-UA-Compatible" content="IE=11">
But this only works if I have compatibility mode ON. With compatibility mode ON, the above tag allows me to change which version of IE the document should be displayed in. With compatibility mode OFF, the above tag has no affect.
Shouldn't this work with compatibility mode OFF?
My situation: Developing website that looks perfect when viewed in IE10/11 with compatibility mode ON. With it OFF it looks bad. Fixing it so that it runs without compatibility mode is not an option. What I need is to force compatibility mode ON for any user that views the site, so that they do not need to manually turn it on. Is this possible?
Thanks in advance

Use:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
You should use IE=edge to tell Internet Explorer to use the highest mode available.

The reason the X-UA-Compatible is not working is because I am using IE11. IE8 will turn compatibility mode on automatically, and then as a developer you can set the content mode. But IE 10/11 require compatibility mode to be set on manually before you can begin controlling emulation via meta tags.

Related

How to launch a local html page in IE10 in compatibility mode?

I have a set of old html+JScript pages that are loaded from a local hard drive only. They used to work in previous versions of IE, but IE10 had something changed and it doesn't work anymore. I didn't write the code, so I don't think it's feasible to see what is broken, but it seems to work if I change IE into compatibility mode.
So I was curious, is there a command line parameter to launch IE in compatibility mode without altering the html file itself?
I think you meant to set compatibility settings to IE8, try
<meta http-equiv="X-UA-Compatible" content="IE=8" />
in head tag of html.
Under the Tools Menu bar, click on Compatibility Mode Settings. You can add all the sites where you want to run in compatibility mode there. More info here

Force HTML page in IE10 to use IE Quirks mode

Indulge me, I'm fighting with IE.
We have a set of pages that work nicely in IE8 (intranet). The company decided upgrading directly to IE10.
What is the html code to force a page to use I5 Quirks Mode (this is the mode it works). I've tried with :
<meta http-equiv="X-UA-Compatible" content="IE=IE5" />
But IE10 put's the page in quirks mode (not IE5). You open the debugger (F12) and there you can change the document mode and the browser mode. The important is to set the document mode in IE5 quirks
Some help is welcomed
The problem seems to be solved somewhere else
Does the windows 8 internet explorer 10 still have quirksmode?
http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx
<meta http-equiv=X-UA-Compatible content="IE=5">
So, your value is false, it's IE=5 and not IE=IE5
IE10 does not have an IE5 mode. They updated Quirks Mode to be more like IE9 (I think, not sure on that) so it's more in line with Chrome/Firefox/etc.. The best it can do is IE7.

IE7, Standards mode vs "IE7 Standards" mode

I have a fairly simple HTML5 website going with some jquery/javascript and CSS. It looks fine in Chrome, FF and IE8, 9 and 10. However, when I switch the browser mode to IE7 it doesn't look right. If I change the document mode to "standards" it looks correct again, still in IE7 mode. Please see the screenshot for clarification. Can someone explain the difference between "Standards" mode and "IE7 Standards" mode? And how can I change the "page default"?
You need to Add
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
in your <head> tag.
This will force IE to use latest rendering engine even in chrome frame .

Emulate IE7 in IE9. What is the default?

I'm currently working on a site that has uses the Emulate IE7 meta tag like this:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
As far as I know and as far as I've googled this tag also addresses IE9, forcing it to go into IE7 compatibility mode.
However I noticed that one of the devs on the project is viewing the page in IE9-mode, not in compatibility mode.
How does this work? Is compatibility mode the default setting in IE9, when the Emulate IE7 meta tag is set? Would one have to manually change a setting in IE9 to bypass the Emulate IE7 meta tag?
The Developer Toolbar in IE9 (and IE8) allows you to change the browser mode-- including forcing display using the IE9 rendering engine.
For more information, read this MSDN article: http://msdn.microsoft.com/library/dd565628(VS.85).aspx#browsermodes

IE Compatibility Mode: 'X-UA-Compatible' tag 'Edge'

I have this in the <head>:
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
It will force the latest rendering mode for IE, but is Compatibility Mode considered the last one?
I mean, for example: using this code with IE8, it will force it to use IE8 or IE8 Compatibility Mode?
That tag will try to force the browser to use the latest rendering mode the browser supports. It will not trigger Compatibility mode.
Note that the tag has to be the first tag in the head or it will not work.
This fact favors using HTTP headers if possible as the order in the HTTP headers does not matter.
If the browser stills ends up in Compatibility mode when you use a header or the meta tag one of these things is likely the cause:
you are missing a sane doctype
the browser has been set to always use compatibility mode
the site is hosted on an "intranet site" and the default setting for intranet sites is set
Changing the browsers Compatibility View settings
Microsoft considers at least 192.168.x.x to be on a "Intranet site". The default for intranet sites in IE8/IE9 is to use compatibility mode. That's a huge issue for many business applications as the programmer CANNOT override this option even with this meta tag. ("Display intranet sites in Compatitiblity View" is not overridable by meta tag or http header - the browser is in complete control of compatibility view in this case)
Always add this meta tag or an http header?
One more good thing about using this meta tag is that the "compatibilty view" icon is removed from the address bar of the browser. At least your users can then not decide the render mode using that button.
Even if you have unchecked the "Display intranet sites in Compatibility View" option, and have the X-UA-Compatible in your response headers, there is another reason why your browser might default to "Compatibility View" anyways - your Group Policy. Look at your console for the following message:
HTML1203: xxx.xxx has been configured to run in Compatibility View through Group Policy.
Where xxx.xxx is the domain for your site (i.e. test.com). If you see this then the group policy for your domain is set so that any site ending in test.com will automatically render in Compatibility mode regardless of doctype, headers, etc.
For more information, please see the following link (explains the html codes): http://msdn.microsoft.com/en-us/library/ie/hh180764(v=vs.85).aspx
I'm not an expert but by trial and error:
<meta http-equiv="X-UA-Compatible" content="IE=8, IE=9, IE=edge"/>
solved the problem for me. I used this on websites and webapps and it stopped IE8 from going into compatibility mode, and displayed as 'standard' in IE10 and IE11.
What is the point of using the Edge keyword alone? I mean, if you want IE to use the most recent rendering engine, then just drop the whole meta tag.
Otherwise, it should look something like that (that would make IE8 behave like IE7 and IE9 and newer will work as usual) :
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=Edge" />