From 44287314f83748e5e9e4ccebb1696e118d51c6fd Mon Sep 17 00:00:00 2001 From: Matthew Flaschen Date: Mon, 21 Apr 2014 18:46:56 -0400 Subject: [PATCH] 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 --- includes/OutputPage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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" . -- 2.20.1