[html] How to force IE10 to render page in IE9 document mode

I have two questions:

  1. How can I force IE10 to render in IE9 document mode? Currently it's rendering my page in Standard document mode.

  2. In IE10's developer toolbar, I am not able to see the option of document mode of IE10. Is it not implemented, or is my browser version is out of date?

Thanks for all your help.


Edit: thanks everyone for the solutions provided. Earlier I was using a meta tag <meta http-equiv="x-ua-compatible" content="IE=edge" > just to make sure that IE will render the page in highest document mode, but I was facing some issues with IE10 standard mode, so I changed the meta tag to render the page in IE9 mode: <meta http-equiv="x-ua-compatible" content="IE=9" >.

This question is related to html browser internet-explorer-10

The answer is


You can force IE10 to render in IE9 mode by adding:

<meta http-equiv="X-UA-Compatible" content="IE=9">

in your <head> tag.

See MSDN for more information...


You should be able to do it using the X-UA meta tag:

<meta http-equiv="X-UA-Compatible" content="IE=9" />

However, if you find yourself having to do this, you're probably doing something wrong and should take a look at what you're doing and see if you can do it a different/better way.


By what this says, IE10 (the article is referred to a preview release, anyway) it's able to use X-UA-Compatible only if the document is in quirks mode (no DOCTYPE), otherwise IE10 won't react to the request.

Here's an excerpt:

Thus, to make IE10 react to the X-UA-Compatible directive, one must either create a page that triggers quirks-mode per the rules of HTML5 (that is: an a page with no doctype). One can also send the directive as a HTTP header, however: A HTTP sent directive appears to have no effect if you use it to downgrade the rendering — it can only be used to upgrade the rendering

So, you've to do it manually with Dvelopers Tools, or with quirks mode (but I suggest to stay in IE10 mode which is for the first time aligned to the other browers' standard)

EDIT: The follows are some useful link to read:

http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx

http://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).aspx

http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx


Do you mean you want to tell your copy of IE 10 to render the pages it views in IE 9 mode?

Or do you mean you want your website to force IE 10 to render it in IE 9 mode?

For the former:

To force a webpage you are viewing in Internet Explorer 10 into a particular document compatibility mode, first open F12 Tools by pressing the F12 key. Then, on the Browser Mode menu, click Internet Explorer 10, and on the Document Mode menu, click Standards.

http://msdn.microsoft.com/en-gb/library/ie/hh920756(v=vs.85).aspx

For the latter, the other answers are correct, but I wouldn't advise doing that. IE 10 is more standards-compliant (i.e. more similar to other browsers) than IE 9.


I haven't seen this done before, but this is how it was done for emulating IE 8/7 when using IE 9:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">

If not, then try this one:

<meta http-equiv="X-UA-Compatible" content="IE=9">

Add those to your header with the other meta tags. This should force IE10 to render as IE9.

Another option you could do (assuming you are using PHP) is add this to your .htaccess file:

Header set X-UA-Compatible "IE=9"

This will perform the action universally, rather than having to worry about adding the meta tag to all of your headers.


You can tweak the Registry if you want to make changes only to your own system. If you have IE10 and lots of web sites you visit don't render properly in IE10, then you can tweak your registry to force IE to open in IE9 mode.

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

Create a DWORD as iexplore.exe and give value 9999. Restart your IE and it will open in IE9 mode :)

Thanks to my colleague Sreejith D :)


I found this post while I was looking for a solution to my DNN6 website. The error was

SCRIPT5007: Unable to get property 'documentElement' of undefined or null reference

But I needed the same solution: force compability mode to IE9. So let me share with you what I did to solve this.

So, for DotNetNuke 6 users try the StyleHelper SkinObject

Worked great for me!


there are many ways can do this:

add X-UA-Compatible tag to head http response header

using IE tools F12

change windows Registry


The hack is recursive. It is like IE itself uses the component that is used by many other processes which want "web component". Hence in registry we add IEXPLORE.exe. In effect it is a recursive hack.


Examples related to html

Embed ruby within URL : Middleman Blog Please help me convert this script to a simple image slider Generating a list of pages (not posts) without the index file Why there is this "clear" class before footer? Is it possible to change the content HTML5 alert messages? Getting all files in directory with ajax DevTools failed to load SourceMap: Could not load content for chrome-extension How to set width of mat-table column in angular? How to open a link in new tab using angular? ERROR Error: Uncaught (in promise), Cannot match any routes. URL Segment

Examples related to browser

How to force reloading a page when using browser back button? How do we download a blob url video How to prevent a browser from storing passwords How to Identify Microsoft Edge browser via CSS? Edit and replay XHR chrome/firefox etc? Communication between tabs or windows How do I render a Word document (.doc, .docx) in the browser using JavaScript? "Proxy server connection failed" in google chrome Chrome - ERR_CACHE_MISS How to check View Source in Mobile Browsers (Both Android && Feature Phone)

Examples related to internet-explorer-10

Force IE10 to run in IE10 Compatibility View? internet explorer 10 - how to apply grayscale filter? How to force IE10 to render page in IE9 document mode Remove IE10's "clear field" X button on certain inputs? Registry key for global proxy settings for Internet Explorer 10 on Windows 8 How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code?