Keith Devon


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’.


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.

Leave a Reply

Your email address will not be published. Required fields are marked *