0

I have created site on MVC 4 and deployed on IIS 7.5.

Now, when this site is open at any client IE browser then it sets COMPATIBILITY MODE automatically and some CSS not worked properly.

It is hosted for intranet purpose.

Please suggest me how i could restrict explicitly or any suggestion.

dove
  • 19,761
  • 14
  • 82
  • 103
dsi
  • 2,509
  • 11
  • 44
  • 85

1 Answers1

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

This will make browser use the latest version of IE available to it. Thus if it is IE9 set to IE7 compatiability mode it will use IE9 rendering.

It should fix those issues, as it's helped me in identical scenario.

dove
  • 19,761
  • 14
  • 82
  • 103
  • chrome=1 will do similar for Chrome, e.g. content="IE=edge,chrome=1" – dove Feb 25 '14 at 12:18
  • It sets to compatibility mode but it affect some CSS. I need IE 9 or IE 8 whiever lateest version. please suggest. – dsi Feb 25 '14 at 14:14
  • You must also ensure you have the doctype set correctly. For modern development it should only be . Indeed, from IE11 onwards this is the only way of achieving 'Edge mode'. See this question for more details: http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge-e – SimonB Mar 23 '14 at 00:27
  • I Have found the will not work by itself in IE, you need both for IE to get the hint that your using the modern standards. And not something else on this page. – Kit Ramos Nov 19 '17 at 19:53