Force Internet Explorer 10 Document Mode - javascript

Basically I have been going through a problem and would like to enforce my browser to be used under Browser Mode: IE 10 Compatable View and Document Mode: Quirks.
As in IE 10 Document Mode is IE 5 Quirks and only Quirks but, I am unable to enforce it by using document mode and meta-tag too.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE"/>
This is what I have been trying but no luck.

You can try this, if the browser it IE10 the rendering machine will be changed to latest one.
!-- Force IE to use the latest version of its rendering engine -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
chrome=1 means IE should use the Chrome rendering engine if installed
I think changing document type Quirks seems a bad idea, however if you need then you may have to remove the !DOCTYPE.
If none of these rules apply, the declaration determines
whether the webpage renders in a standards mode, Almost Standards
mode, or quirks mode.
Reference: http://msdn.microsoft.com/en-us/library/ff405803(v=vs.85).aspx

Related

How to set Documents mode Quirks in asp.net

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

Internet Explorer browser 9 and meta tag 10 or higher? What happens?

I have 3 situations I like to understand, but don't know the how to confirm or to test and analyse :(
In all case we use Internet Explorer Browser 9 application.
Situation 1:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="X-UA-Compatible" content="IE=10" />
As you above see the HTML pages is set meta tag is set to content=10, but we use IE9 browser. What will happens? which metag is used? What if I set content=IE11 or contentXSSDDS in meta tag? So what's the fallback?
Situation 2:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="X-UA-Compatible" content="IE=8" />
Here we use content=IE8, so does it mean IE9 features mentioned in http://msdn.microsoft.com/en-us/library/ie/dn467846%28v=vs.85%29.aspx#changes_introduced_for__ie11 are not used? I need to look a the IE8 features right?
Situation 3:
If we use IE9 or IE10 browser and we set the doctype type <!doctype html> what doctype is then used in the HTML page? I mean what engine is it used. Will it use HTML 5?
Does your content type also decide whether you can use new HTML 5 (elements or not) like etc.
correction after Jukka's right remark:
Situation 1: Browser IE9 is used and in HTM pages meta tag: content="IE8" for 1 application
Situation 2: Browser IE9 is used and in HTML pages meta tag: content="IE10" for another application
What will it do in situation 1: Will it use IE8 engine (features) and in situation 2...
For me it's not clear a browser version 9 is installed and you use content IE=10...??

GWT application is not showing in IE

I have a GWT 2.6 app which works fine on every browser except in IE (IE11). I am compiling application for all browsers. Using developer tools (console posts) i can see that application does load as it should be, but the page is blank and nothing is shown. No error appears in console and there is only a warning...
HTML1524: Invalid HTML5 DOCTYPE. Consider using the interoperable form "<!DOCTYPE html>".
File: user, Line: 1, Column: 1
...concerning application HTML file. I removed all Views and Widgets and left only basic view with some background and picture, and it still does not load properly only in IE.
I tried adding
<meta http-equiv="X-UA-Compatible" content="IE=5,6,8,9" >
to app html file but it doesn't make a difference nor does a Compatibility View settings and changing Document Type. I really do not care so much about app working in older IE versions, but >9 is preferable.
What am i missing here?
EDIT:
Actually the problem was having DockLayoutPanel in my View. Changed DockLayoutPanel into DockPanel and the application appeared (with some differences comparing to UI in other browsers).
Make sure that your html host page is properly formatted. It should start with the DOCTYPE declaration, followed immediately by <html> tag:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
...

Force to Open HTML in IE8 instead of any other versions of IE?

I have designed a HTML Page and I want that whenever user opens in IE, than by default it should open in IE8 Standards version of IE.
Instead if there is IE9 or IE10 it should take IE8 as default.
You can instruct Internet Explorer 9 and newer to render in IE 8 mode with:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
This is documented on msdn.
See the comments on the question for why you should not do this.
If you are doing this for testing purposes:
<meta http-equiv="X-UA-Compatible" content="IE=8" />
This forces IE 8 to display the page in Internet Explorer Standards mode.
Or
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
This forces IE 8 to use the !DOCTYPE declaration in the page to determine the rendering mode.
More info: http://msdn.microsoft.com/en-us/expression/dd835379.aspx
Here are both the HTTP and the tag ways of setting X-UA-Compatible:
HTTP:
Header set X-UA-Compatible "IE=8"
Meta:
<meta http-equiv="X-UA-Compatible" content="IE=8" />
http://farukat.es/journal/2009/05/245-ie8-and-the-x-ua-compatible-situation

How to fix Document mode restart in IE 9

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.

Categories