How to set Documents mode Quirks in asp.net - javascript

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

Related

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 Internet Explorer 10 Document Mode

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

Can I turn on IE 10 Compatibility View using JavaScript or 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.

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.

Turn off IE 8 Compatibility Mode for site

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.

Categories