How To set IE mode by meta tag?
Asked Answered
M

1

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.

Maidy answered 25/2, 2014 at 12:13 Comment(1)
check #6771758Cornetcy
K
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.

Kernite answered 25/2, 2014 at 12:13 Comment(4)
chrome=1 will do similar for Chrome, e.g. content="IE=edge,chrome=1"Kernite
It sets to compatibility mode but it affect some CSS. I need IE 9 or IE 8 whiever lateest version. please suggest.Maidy
You must also ensure you have the doctype set correctly. For modern development it should only be <!DOCTYPE html>. Indeed, from IE11 onwards this is the only way of achieving 'Edge mode'. See this question for more details: #6771758Coeducation
I Have found the <!DOCTYPE html> 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.Reckford

© 2022 - 2024 — McMap. All rights reserved.