IE Compatibility view issues

I’ve run into issues a few times recently with Internet Explorer’s ‘Compatibility view’. Some of my standards compliant web pages were being broken by having this view enabled.

I found a solution via this stackoverflow page.

If you add the following to your <head> it will force IE to disable compatibility view:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

However, if IE thinks that your website is part of an intranet you’ll have to disable this manually in the browser. The only way to override that is to uncheck ‘Display Intranet sites in Compatibility View’ checkbox in ‘Tools’ > ‘Compatibility View settings’.

Update

Wesley Burden (@wesleyburden) shared this little function with me:

add_action( 'send_headers', 'add_header_compatibility_mode' );

function add_header_compatibility_mode() {
header( 'X-UA-Compatible: IE=edge,chrome=1' );
}

Apparently this will override the IE settings and  disable compatibility even if part of an intranet. If you try it out let me know if it works.

WordPress SEO: 10 tips for better search rankings

FREE E-book. Learn the basics of WordPress SEO and how to improve the key metrics
  • We won't sell your address to anyone. We hate spam too.
View my portfolio Get in touch

Leave a Reply