Skip to content

Instantly share code, notes, and snippets.

@tarnus
Created July 17, 2013 15:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarnus/6021420 to your computer and use it in GitHub Desktop.
Save tarnus/6021420 to your computer and use it in GitHub Desktop.
preprocess-html hook to force IE out of compatibility mode
// Using Omega theme copy this to preprocess-html.inc
$data = array(
'#tag' => 'meta',
'#attributes' => array(
'http-equiv' => "X-UA-Compatible",
'content' => "IE=edge,chrome=1",
)
);
drupal_add_html_head($data,'key');
// Otherwise use the following in template.php
function THEMENAME_preprocess_html(&$vars) {
$data = array(
'#tag' => 'meta',
'#attributes' => array(
'http-equiv' => "X-UA-Compatible",
'content' => "IE=edge,chrome=1",
)
);
drupal_add_html_head($data,'key');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment