From: Matthew Flaschen Date: Mon, 21 Apr 2014 22:46:56 +0000 (-0400) Subject: Change X-UA-Compatible from tag to HTTP header X-Git-Tag: 1.31.0-rc.0~15936^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=44287314f83748e5e9e4ccebb1696e118d51c6fd;p=lhc%2Fweb%2Fwiklou.git Change X-UA-Compatible from tag to HTTP header Derk-Jan Hartman suggested this to remove a HTML validation error. As he noted, the HTTP header is also more effective, since it works on intranets, and is not sensitive to ordering issues within the . See http://stackoverflow.com/questions/6156639 . Bug: 62885 Change-Id: I2214abcb1badbbaca48427a31d1218c9db9a6af7 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f5dbfc6d58..76f0aab14f 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2039,6 +2039,10 @@ class OutputPage extends ContextSource { $response->header( "Content-type: $wgMimeType; charset=UTF-8" ); $response->header( 'Content-language: ' . $wgLanguageCode ); + // Avoid Internet Explorer "compatibility view" in IE 8-10, so that + // jQuery etc. can work correctly. + $response->header( 'X-UA-Compatible: IE=Edge' ); + // Prevent framing, if requested $frameOptions = $this->getFrameOptions(); if ( $frameOptions ) { @@ -2523,10 +2527,6 @@ $templates $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n"; - // Avoid Internet Explorer "compatibility view", so that - // jQuery can work correctly. - $ret .= Html::element( 'meta', array( 'http-equiv' => 'X-UA-Compatible', 'content' => 'IE=EDGE' ) ) . "\n"; - $ret .= ( $this->getHeadLinks() . "\n" .