11

In IE9 my browser has set:

F10 -> tools -> compatibility views setting -> added 192.168.10.227

therefore when I try to serve file, the browser mode is 9 compat view, the document mode is IE7 standard.

My question is, how do I make the document mode IE9 instead of IE7?

I tried:

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

but neither is working.

here is my document

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>OpsCentral&trade;</title>
        <link rel="shortcut icon" type="image/x-icon" href="/opscentral/demo/favicon.ico" />
<link rel="icon" type="image/x-icon" href="/opscentral/demo/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/opscentral/demo/css/main.css" />
<link rel="stylesheet" type="text/css" href="/opscentral/demo/css/widget_list.css" />
<script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.js"></script>
<script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.ajaxq.js"></script>
<script type="text/javascript" src="/opscentral/demo/js/util.js"></script>
<!-- *******************************************************************
    WOM - Windows on Load Manager
******************************************************************** -->
<script type="text/javascript" src="/opscentral/demo/js/wom.js"></script>
<script type="text/javascript" src="/opscentral/demo/js/widget_list.js"></script>
<!-- *******************************************************************
    NIFTY CORNERS
******************************************************************** -->
<script type="text/javascript" src="/opscentral/demo/js/niftyCornersCube.js"></script> 
<link rel="stylesheet" type="text/css" href="/opscentral/demo/css/niftyCornersCube.css" />
    <link rel="stylesheet" type="text/css" href="/opscentral/demo/css/jQuery/jQuery.pagination.css" />

    <link rel="stylesheet" type="text/css" href="/opscentral/demo/css/widget_form.css" />

    <script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.dimensions.js"></script>
    <script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.jTemplates.js"></script>
    <script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.pagination.js"></script>
    <script type="text/javascript" src="/opscentral/demo/js/jQuery/jQuery.XMLUtils.js"></script>


        <link rel="stylesheet" type="text/css" href="/opscentral/demo/css/calendar-blue.css" />
<script type="text/javascript" src="/opscentral/demo/js/widget_calendar.js"></script>
<script type="text/javascript" src="/opscentral/demo/js/calendar/calendar.js"></script>
<script type="text/javascript" src="/opscentral/demo/js/calendar/calendar-en.js"></script>
<script type="text/javascript" src="/opscentral/demo/js/calendar/calendar-setup.js"></script>

        <script type="text/javascript" src="/opscentral/demo/recordingJssCss/js/jquery-1.8.2.js"></script>
<script type='text/javascript'>  
    var $jq182 = jQuery.noConflict();  
</script>  
<script type="text/javascript" src="/opscentral/demo/recordingJssCss/js/jquery-ui-1.9.1.custom.js"></script>
<link rel="stylesheet" type="text/css" href="/opscentral/demo/recordingJssCss/css/smoothness/jquery-ui-1.9.1.custom.min.css" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
<meta http-equiv="X-UA-Compatible" content="IE=8" />
Stupidfrog
  • 2,042
  • 6
  • 25
  • 35
  • In [this question](http://stackoverflow.com/questions/9182428/force-internet-explorer-9-to-use-ie-9-mode?rq=1), the marked answer reccomends put a line in the **HTTP header**, not the HTML itself, you could try. :) – Arkana Jun 19 '13 at 06:44

3 Answers3

8

i think you should also add <!doctype html> check this post out Forcing Internet Explorer 9 to use standards document mode

Community
  • 1
  • 1
Dejan Dakić
  • 2,418
  • 2
  • 25
  • 39
  • Thanks! after replace the doctype, then everythings go well! – Stupidfrog Jun 19 '13 at 07:02
  • Doesn't work if the web page contains a flash. The document mode is indeed set to 9 but the flash block is blank. However, if press F12 at this time, the flash block will display contents. Looks like changing document by meta tag can't influence IE to deal with flash correctly – Scott Chu Mar 15 '18 at 05:56
6

I believe you need to include

<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />

Edit

Also I would include a

<meta charset="utf-8" />

or what ever charset your using. Also moving these to the top of the head would make a difference as well.

Nathan Fisher
  • 7,961
  • 3
  • 47
  • 68
0

But according to IE DEv Center ,

In addition, do not use an "X-UA-Compatible" meta tag on the page or send a custom HTTP header from the web server.

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.

user2537735
  • 117
  • 1
  • 2
  • 11