Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In preparing my first Aurora site for release I discovered the pages failed validation due to the annoying X-UA-Compatible tag for IE/Chrome Frame that isn't considered standard as of yet.
I researched this and found that you can work around the validation issue by using an http header instead of a meta tag. I quick grep showed that the html5_tools module is already doing this:
// Line 222 of html5_tools.module
if (variable_get('html5_tools_add_chrome_frame_header', 1)) {
drupal_add_http_header('X-UA-Compatible', 'IE=Edge,chrome=1');
}
I ended up adding this to my template.php to remove the meta tag Aurora is adding:
/**
* Override or insert head content on the site.
*
* @param $head_elements
* An array of all head elements being presented on the page.
*/
function theme_html_head_alter(&$head_elements) {
unset($head_elements['x-ua-compatible']);
}
// */
Would it make sense to patch Aurora to set the header instead of the meta tag and/or make this a theme option?
Comments
Comment #1
iamcarrico CreditAttribution: iamcarrico commentedI have removed support for Chrome frame entirely as it is going away soon http://blog.chromium.org/2013/06/retiring-chrome-frame.html
I left the meta tag in, as it is only there for old IE versions--- and validation is only meant as a guide not as a need to have.
Comment #3
marcvangendI don't quite understand the change that was committed. The checkbox for
aurora_enable_chrome_frame
was removed, but the theme setting is still referenced in other parts of the code. The theme settings form still contains a "Minimum supported Internet Explorer version" select box. When I create a new subtheme, the info file containssettings[aurora_enable_chrome_frame] = 1
.What's the status, is chrome frame really removed from Aurora?
Comment #4
iamcarrico CreditAttribution: iamcarrico commentedChrome frame was removed, I also removed the setting from the info file.