Im using bootstrap framework and using the follwoing docttype and meta tag.
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
Here IE showing document mode as 5(default), mean while all the UI got disturbed, any solution for showing IE=edge.
Thanks
Your IE options are probably set to display Intranet sites in Compatibility View. I tested IE 11 at the official Bootstrap site and it was set to Edge using X-UA meta tag.
From the MS documentation:
Via intranet compatibility settings: The "Display intranet sites in Compatibility View" box is checked in the Compatibility View settings."
Related
In our application we are using <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> as the first line of code inside <head>tag. In Local and QA it is working fine, but when we try to open PROD in IE we are facing some problem - it is opening in document mode 7. In IE EDGE it is working fine, we are facing this issue in IE 11.
What might be the problem?
If:
The production environment is in the Intranet zone (right-click and then choose Properties), and
The page does not contain a <!DOCTYPE> directive, and
The Default settings have not been changed
(Other factors may also be involved.)
Then, the page is likely loading in IE7 Compatibility mode by design.
If you cannot change the page to include the HTML5 doctype directive (<!DOCTYPE html>), then you might see if the web server can serve the x-ua-compatible header with the page.
I have this html/jsp page:
<%#page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html ...
</html>
which, for some reason, is opened by default in compatibility mode on IE (in my case version 10) and this messes up everything as it just does not understand some modern constructs present in libraries such as angularjs.
By opening developer's tools and changing the view mode to "standard IE" everything fixes up and my web application works fine.
So, what's wrong with this header? Is there a way to force IE to open my page in normal mode?
This question is more or less the same of this one, I know that:
Why Does IE-8 push the view to Compact/Compatibility view?
but I don't want to force my user to open tools and set options like correct marked answer suggests: most of them are just ignorant, many of them have developers tools disabled on their company's PC.
In the end just want to see where's the problem with my web application and make so that IE accepts it as a normal page.
insert meta tag in header HTML:
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
The "edge" forces standards mode (or latest rendering engine) in IE.
To force IE8 to standard mode.
<meta http-equiv="x-ua-compatible" content="IE=8">
Can anyone guide me how to disable enterprise mode of Internet Explorer using Html code for e.g. meta tag?
Or
How can I emulate different version like IE8/IE9 etc using HTML meta tag ?
I tried something like below, but its not helping.
<meta http-equiv="x-ua-compatible" content="IE=10">
When I view my website in IE10, it seems that it's automatically forcing IE8 document standards. However, I would like it to use IE9 standards, when being viewed in IE10.
Is there a way to do this?
The page has <!DOCTYPE html> at the top.
EDIT: It turned out that I had <meta http-equiv="X-UA-Compatible" content="IE=8" /> in the page header, which was causing the page to render in IE8 document mode. Changing this to IE=9 fixed the issue.
I recommend to use the X-UA meta tag. The X-UA-Compatible meta tag allows you to choose what version of Internet Explorer the page should be rendered as.
You specify the user agent and version to use in the contents of the tag. The current options you have for the content are: IE=5, IE=EmulateIE7, IE=7, IE=EmulateIE8, IE=8, IE=EmulateIE9, IE=9, IE=edge.
Emulating the version tells the browser to use the DOCTYPE to determine how to render content. Pages without a DOCTYPE will be rendered in quirks mode. If you tell it to use the browser version without emulating (i.e. IE=7) the browser will render the page in standards mode whether or not there is a DOCTYPE declaration. IE=edge tells Internet Explorer to use the highest mode available to that version of IE. Internet Explorer 8 can support up to IE8 modes, IE9 can support IE9 modes and so on.
I think you need this:
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Use X-UA meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=9" />
And I don't know why you want to do this, as IE 10 is far more excellent than any of the previous versions of IE, if you are testing, you can press F12 and change the mode
When I open a webpage in IE9 with DOCTYPE as
<!DOCTYPE html>
It opens Document Mode as IE7 standards.
I need default IE9 standards on opening the page.
How to correct this document mode problem?
A screenshot of how it comes in IE browser developer tool
Try this answer: https://stackoverflow.com/a/13524518/1679310.
Summary, give the IE browser more information in the meta tag:
<!DOCTYPE html>
<html>
<head>
<title>My Web</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Edit Note: As Olly Hodgson mentioned, the proper option is IE=edge, as currently stated in the above snippet. Below is the original, also working version:
<meta http-equiv="X-UA-Compatible" content="IE=100" />
There can be multiple reasons why it could be parsing the document under IE7 standard:
The server is sending a X-UA-Compatible header for IE7 in the HTTP response of the document. Check the server response headers using a tool like Fiddler.
The HTML document is setting a meta tag with the X-UA-Compatible property value for IE7.
The page is being detected automatically by IE for opening in "Compatibility view". Note here that by default all intranet sites are viewed in "Compatibility view" in IE. Uncheck the checkbox "Display intranet sites in Compatibility view" under Tools -> Compatibility view settings in IE. The "Display all websites in Compatibility view" should be unchecked too.
You used the Developer tools and explicitly set to view the page to render in "IE7 standards" mode. Note that this will only occur on a per client basis though.
Update 2016-01-28
As #Gordon pointed out in the comments below, another reason can be that the network administrator has set the site for compatibility view as a Group Policy on the network.
The only resolution in that case is to contact the network administrator to remove the site from the Group Policy. See HTML1203 here.
You can set this in the web.config as well.
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=edge" />
</customHeaders>
</httpProtocol>
Does your page contain the meta tag for forcing IE7?
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
this will force the page to use IE7 compatibility.
Just wanted to share that if your web server is Apache2 you could set the Response header like below in your VirtualHost configuration which will also resolve the issue.
Header set X-UA-Compatible "IE=edge"
The issue appears to be specific to the combination of IE9 and compatibility mode. For us, we cannot disable compatibility mode since it is a SharePoint 2013 site and IE11 must run in compatibility mode to edit pages, but IE9 was behaving as you are showing. Setting the X-UA-Compatible to "IE=edge" in a meta tag did fix our issue, although setting the value to IE=10 did not affect our behavior. We also have the same doctype.
If your project is ASP.NET MVC, make sure that you add the:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
tag into your Layout (template) page. I just spent two hours debugging and tweaking, only to realize that I had only added that meta tag into my child pages. As soon as I added it to my layout page, the browser loaded in EDGE mode perfectly.