Reputation: 7375
I have developed MVC5 application and hosted in server. Our Application supports from IE10 to 11. When i open the IE browser with our hosted link, the browser default document mode sets to 7 because of that it is throwing compatability issues. For that i have to add the meta tag to all layout pages.
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
Our application having more than 10 layout pages.
what is the best way to add the meta tags for all the layouts in our application in single attempt itself or else if there any other way to fix the above issue.
Upvotes: 0
Views: 178
Reputation: 324
If you're doing MVC then you should already have the "_Layout.cshtml" or "_Laybout.vbhtml" page that you can set the meta tag in the site master page.
You can also do this in your Web.config file:
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=Edge,Chrome=1" />
</customHeaders>
</httpProtocol>
</system.webServer>
Upvotes: 1