I have a webpage that is not working properly in IE unless I hit F12 and change the document mode to "Edge" under emulation. Is this something I can do programmatically on the page so the user does not have to do this? TIA
Asked
Active
Viewed 2,217 times
0
-
possible duplicate of [Which X-UA-Compatible mode should I be using?](http://stackoverflow.com/questions/6692596/which-x-ua-compatible-mode-should-i-be-using) – mason Apr 17 '15 at 19:02
-
1have you tried something like ``? – bdimag Apr 17 '15 at 19:02
-
@bdimag If you're going to answer the question, do it as an answer. Not a comment. – mason Apr 17 '15 at 19:03
-
@bdimag would this go at the top of my html code of the page? I get an error this is not supported outside script or asp region – user1342164 Apr 17 '15 at 19:06
1 Answers
4
You could try adding the X-UA-Compatible
META tag. This belongs in your <head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
Internet Explorer allows you to define which version's engine is used to render a page using the X-UA-Compatible META tag or HTTP header. A specific version can be designated or the latest version using the 'IE=edge' value.
You can also add custom HTTP headers in the ASP.NET web.config:
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=edge" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

bdimag
- 953
- 8
- 11
-
would this go at the top of my html code of the page? I get an error this is not supported outside script or asp region – user1342164 Apr 17 '15 at 19:09
-
1@user1342164 in the `` section "as close to the top of the page's HEAD as possible" (e.g., above `title`) – bdimag Apr 17 '15 at 19:13