Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE9 throwing site to Quirks mode

I want to avoid that. I've tried:

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

(from HTML5 doctype putting IE9 into quirks mode? ) And:

<meta http-equiv=”X-UA-Compatible” content=”IE=9″ />

(from Disable quirks mode for parent frame )

But neither helps. When I do F12 - Document mode IE9 standards - the page is shown fine.

Any solution?

like image 821
ispiro Avatar asked Jan 19 '26 02:01

ispiro


1 Answers

If the page is local, or on an Intranet , Internet Explorer defaults to quirks mode.

If you put the same page on The Web, it would behave as expected.

To get it working as you want, as you are using ASP.NET, you can add this to your web.config file:

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

This avoids having to override the user settings for all Intranet pages.

like image 150
Fenton Avatar answered Jan 21 '26 18:01

Fenton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!