The X-UA-Compatible http-equiv meta tag added by advagg_preprocess_html() method fails to validate in W3C validator.

If you're looking to make it technically valid (everyone loves to see the green favicon) w/o effecting any functionality, you should be able to just wrap it in a "if IE" tag.

The meta_ie_render_engine should be modified to add prefix and suffix as below

// Setup IE meta tag to force IE rendering mode.
  $meta_ie_render_engine = array(
    '#type' => 'html_tag',
    '#tag' => 'meta',
    '#attributes' => array(
      'http-equiv' => 'X-UA-Compatible',
      'content' =>  'IE=edge,chrome=1',
    ),
    '#weight' => '-99999',
    '#prefix' => '<!--[if IE]>',
    '#suffix' => '<![endif]-->',
  );

Comments

mikeytown2’s picture

Status: Active » Fixed
StatusFileSize
new364 bytes

Thanks for the tip :)
Following patch has been committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

yannisc’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Component: AdvAgg Modifier » Code
Status: Closed (fixed) » Active

When the W3c validator checks URL reports this as incompatible even if it's inside the IE conditional. When check is done through the direct input option it doesn't report an error though.

So, since Chrome frame is retired, I would suggest to remove the chrome=1 part.

yannisc’s picture

Status: Active » Needs review
StatusFileSize
new484 bytes

I attach a patch that removes the chrome=1 part and since it is valid, the IE conditionals as well.

mikeytown2’s picture

It's still out there in the wild; thinking I'll use a header
http://www.validatethis.co.uk/news/fix-bad-value-x-ua-compatible-once-an...
header('X-UA-Compatible: IE=edge,chrome=1');

mikeytown2’s picture

StatusFileSize
new796 bytes

header in patch form

  • mikeytown2 committed 8060f81 on 7.x-2.x
    Issue #2136475 by mikeytown2, yannisc: X-UA-Compatible value IE=edge...
mikeytown2’s picture

Title: X-UA-Compatible value IE=edge must be wrapped around ID check to pass w3c validation » X-UA-Compatible value IE=edge must be in header to pass w3c validation
Status: Needs review » Fixed

#6 has been committed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.