Reputation: 85
How do i change the 'Document Mode' of IE in web config?
I have developed a website and it works good in my local. But after publishing, when am trying to open the site i could see some misalignment.i checked the document mode using developer tool it is IE7 standards.
When i change it in to IE9 there it works as expected.
Upvotes: 0
Views: 1762
Reputation: 93444
Don't use Emulate-IE9, just use <add name="X-UA-Compatible" value="IE=edge" />
This will cause IE to always render in its most standards compliant mode.
However, your problem is most likely not this header. It's probably that you are not using a proper doctype tag, or you are doing something else to force IE into compatibility mode. The X-UA-Compatible header will not fix a basic problem with your HTML validity that causes compatibility mode.
Another possibility is if you are on a corporate network and they are overriding the compatibility mode for your site (usually because they are trying to make older apps on the same site work). In which case, you will need to talk to your network administrators to fix the problem.
Upvotes: 1