I have a problem with opening my website in IE9. When I try to open my site I get this error in dev tools:
HTML1113: Document mode restart from Quirks to IE9 Standards
I googled and found an answer that suggested to use this:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
or
<meta http-equiv="X-UA-Compatible" content="IE=IE9" />
...but these do not work and I get the following message this time:
HTML1115: X-UA-Compatible META tag ('IE=Edge') ignored because document mode is already finalized.
What is my problem? I read several articles like IE’s Compatibility Features for Site Developers by Microsoft and traced my site with Determining IE9’s Document Mode flowchart and use all suggestions relating to !doctype on these sites but no-one could solve my problem and my IE engine reset after the page opened.
I develop my site with ASP.NET 4 on Windows Server 2008.
How can I fix this issue?
One solution that should always work is to put your X-UA-Compatible in HTTP headers. Also, your <!DOCTYPE> should be specified at the top of your HTML document (<!DOCTYPE html> is the easiest one).
If you put your X-UA-Compatible declaration inside the meta tag you can run into the following problems:
X-UA-Compatible is ignored unless it's present inside the first 4k of you page. If you put it somewhere in the bottom of your head section (or in the body) move it to top. The best place for it is right after encoding and language declarations.
X-UA-Compatible is ignored if it's put inside IE conditional comments. For example:
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
In this case you should remove conditional comments.
Also, you shouldn't have any text before the doctype declaration. If you've got any HTML comments there, for example, the IE will switch to quirks mode.
Finally, check if you're viewing this site from the intranet. By default Compatibility View is enabled for Intranet sites.
I suggest set X-UA-Compatible header for you page and then see if your site is still switching to quirks mode. In that case you should check your markup and try to fix any HTML validator errors until it's back to Standards Mode.
Related
I have a header that I include on different pages.
Inside header I have
<meta http-equiv="X-UA-Compatible" content="IE=10" />
It works on one page, but when I click a link to another page with same header it becomes default internet explorer 11. something is overriding my meta tag.
I'll include an image with dev tool explanation. Can anyone point to right article or if you had incounter this problem can you tell me where is the problem?
BTW I am using Serial Port reader program that supports only IE-10
but PC is windows 10 and I can't have IE-10 there.
First Page where meta tag works,
Then I click Detail link it brings me to the page within same header, but there I loose meta tag.
and error in console if it is somehow related to this issue
I started debugging with <cfabort> on every line of code and when I reach Coldfusion's <CFORM>, <CFINPUT> and <CFSELECT> tags, I lost meta tag ie=10 . Here it was becoming IE defalut 11. I put regular HTML Tags and it worked. Thanks for your time guys.
i am using IE 10 and i want to make Document mode of browser set to normal Quirks not IE 5 quirks of my website.I put <meta http-equiv="X-UA-Compatible" content="IE=10;IE=9;IE=edge"> in my master page but no luck,Can anybody share your thoughts
Check if you have included the doctype at the top of your master page.
<!DOCTYPE html>
If the browser supports the above tag(HTML5),It will make the browser to render the page at its highest version.
And the meta tag should be like this:
<meta http-equiv="X-UA-Compatible" content="IE=10,9,edge">
IE9 and below versions will render the page to IE5.5 version in Quirks mode.
MSDN Reference
Is it possible to disable the IE compatibility mode from within an Iframe?
If I use the following meta in the iframe html, this not working:
<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
It depends on if you have access to the x-ua-compatible meta of the host (parent). When the host page is at IE9 mode or above, its state is imposed on the iframe. Here's a good explanation, given by a moderator at MS-Connect.https://connect.microsoft.com/IE/feedback/details/1047106/when-webpage-emulates-ie-5-embedded-iframe-shows-ie-8Here's supplemental info about how Quirks mode forked two ways beginning with IE10.https://msdn.microsoft.com/library/hh869300(v=vs.85).aspxHere's a live demo which allows changing the IE modes on-the-fly.It was patched to also allow selecting the iframe url.https://googledrive.com/host/0B8BLd2qPPV7XfnZQRk1JSkg5cFVMbGI1QkZVclVBbUtWZnV2bmczUHpSaVJmSXBOdUg2ek0/toggle-IE-compat-and-quirks-modes.html
How can I turn on IE 10 Compatibility View programmatically in Javascript or HTML?
I just added the following meta tag within the <head> tag, but it is not working.
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE7" >
Is there any way to do the same thing in JS?
I checked the compatibility mode article on msdn - here.
Your meta tag is still the method for enabling compatibility mode in IE 10 and IE 9.
As long as you have:
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<!-- Other meta tags etc. -->
<head>
Then it should work. You could try making the http-equiv value case sensitive (at the moment you've set it to lowercase).
Also, to answer your question about JS, you can detect whether the browser is in compatibility mode by comparing the browser engine with the browser version for IE. However, this involves browser version detection, which tends to be a bit unreliable. Also, there isn't a way for you to set the user's compatibility mode in JS. So, for the moment at least, you'll have to stick with the meta tags.
I hope this helps.
A good plugin to allow you to view http header information is IEhttpheaders. Just download it from that link & install. Then, when you start IE, go to the tools menu and select 'DisplayIEhttpHeaders...'. When you visit your site it will list the header response. If you modify your answer to include the response, then we can see if it's the problem.
You say “I just added the following meta tag within the header tag”. Do you mean:
The <header> tag
The <head> tag?
The x-ua-compatible meta tag does need to go inside the <head> tag, not a <header> tag.
My company uses IE8 as the default browser and by default compatibility mode is set for all intranet sites. I'm building an intranet site that works when compatibility mode is turned off. I'm using reset.css and several opensource javascript programs, e.g. datatables.
What I'd like to do is force compatibility mode off for my site. Is there any programmatic way to do it? I have tried setting the meta values
<meta http-equiv="X-UA-Compatible" content="IE=IE8" />
and
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
to no avail.
What's the most frustrating part is that Chrome and Firefox work great as is.
The <meta> tag has to be the first tag inside the <head>, other than <title> and other <meta> elements.
The X-UA-compatible header is not case sensitive; however, it must appear in the Web page's header (the HEAD section) before all other elements, except for the title element and other meta elements.
http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx#DCModes
These must be the FIRST meta tag on your page. Perhaps that's the issue.