Last active
August 29, 2015 14:07
-
-
Save nickcernis/c3fec859923d2e494ad6 to your computer and use it in GitHub Desktop.
Ask IE not to use compatibility view (Note: may not work with caching plugins; use Apache/nginx to send headers instead)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Don't copy the opening <?php tag above! | |
// Send headers to ask IE NOT to use compatibility mode | |
add_filter( 'wp_headers', 'genesis_keep_ie_modern' ); | |
function genesis_keep_ie_modern( $headers ) { | |
if ( isset($_SERVER['HTTP_USER_AGENT']) && (strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false) ) { | |
$headers['X-UA-Compatible'] = 'IE=edge'; | |
} | |
return $headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment