2

A website that was deployed has crashed, and it is because it is rendering it in "IE7 Strict". This test was determined by the following code snippet:

var vMode = document.documentMode;
var rMode = 'IE5 Quirks Mode';
if(vMode == 8){
  rMode = 'IE8 Standards Mode';
} else if(vMode == 7){
  rMode = 'IE7 Strict Mode';
}
alert('Rendering in: ' + rMode);

This is an ASP Web application.

I was thinking that if it were opened with IE11, it would render it in IE11. It seems that is definitely NOT the case.

How would i resolve this? Do i have to add something to the config file of my WebApplication, or is an IE module that needs to be removed? Are there meta tags i need to append to the MasterPage Header?

TylerH
  • 19,065
  • 49
  • 65
  • 86
Fallenreaper
  • 8,518
  • 10
  • 53
  • 107
  • https://developer.mozilla.org/en-US/docs/Quirks_Mode_and_Standards_Mode – BlackICE Feb 04 '14 at 16:43
  • That doesn't make any difference, IE has it's own tag standards, Murali's answer below is the most appropiate one – PlaceUserNameHere Feb 04 '14 at 16:46
  • Thanks guys. :) Yea, IE has always confused me. My bosses all by default opened it in IE where it worked in Chrome. I think the best thing is to actually sneak onto their machines and change their default browsers. ;) heh. It seems that Murali might have the correct answer, but i am building and submitting to build queue before i give him the answer points. – Fallenreaper Feb 04 '14 at 16:50
  • 1
    Have you seen [this answer](http://stackoverflow.com/a/13287226/1169519)? – Teemu Feb 04 '14 at 18:12
  • great alternative to setting the metatag. – Fallenreaper Feb 04 '14 at 20:01

1 Answers1

7

You can use X-UA-Compatible to IE=edge to make use of latest IE version to render

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

check What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do? for more information

Can be configured in web.config for all the pages, also it will make sure that intranet website will render it accordingly. I was facing the problem with internal website, even after adding a META tag. Hence I updated it in web.config

<system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="X-UA-Compatible" value="IE=edge" />
      </customHeaders>
    </httpProtocol>
</system.webServer>
Community
  • 1
  • 1
Murali Murugesan
  • 21,303
  • 16
  • 65
  • 114
  • Thanks. Ill check to confirm, and add a comment if something is not correct. Then ill give you the thumbs-up-green-checkmark :) – Fallenreaper Feb 04 '14 at 16:48
  • 1
    Is content Case Sensitive? It seems that the link you gave me etc seems to use: "Edge" and more then a few other examples similarly are UpperCase. I just wanted to make sure the syntax and documentation was correct for people who visit here in the future. – Fallenreaper Feb 04 '14 at 16:54