Intranet and Internet site look different in IE 10

by sunil ravulapalli /20. February 2013 21:18 /other /Comments (0)

Recently, when I opened a local site intranet site in IE10, it looked broken. When I cross checked the same on my production sever it looked fine. I checked to make sure all my code was same, it was.

So, what gives?

I hit F12 and saw 3 things which seemed off.

1. Browser mode: IE10 Compat View

2. Document Mode: IE7 Standards

3. What was my DOCTYPE commented?

So I started googled "ie10 doctype getting commented out" and I found my answer here:

http://stackoverflow.com/questions/14200524/html5-doctype-commented-out-for-ie10-pp2-but-not-chrome

The following post also says, "Are you on the same domain? If so, IE automagically forces one into intranet-friendly compatibility mode. "

http://stackoverflow.com/questions/8015162/force-iis-to-allow-transitional-doctype

To summarize, if you put this in your web.config, it generates a META tag in the HEAD telling IE to use latest rendering mode instead of going to older modes no matter what.

<system.webServer>
<httpProtocol>
  <customHeaders>
    <clear />
    <add name="X-UA-Compatible" value="IE=edge" />
  </customHeaders>
</httpProtocol>
</system.webServer>
blog comments powered by Disqus