Disable IE Compatibility View

This will disable the compatability view button in IE, which can interfere with modern websites.  It does it by 

function MYTHEME_html_head_alter(&$head_elements) {
  $head_elements['MYTHEME_ie_compatability'] = array(
    '#type' => 'html_tag',
    '#tag' => 'meta',
    '#attributes' => array(
    'name' => 'X-UA-Compatible',
    'content' => 'IE=Edge,chrome=1',
    ),
  );

  $head_elements['MYTHEME_ie_compatability']['#attached']['drupal_add_http_header'][] = 
    array('X-UA-Compatible', $head_elements['MYTHEME_ie_compatability']['#attributes']['content']);
}

Tags

drupal ie theming drupal 7