X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FOutputPage.php;h=4635f991c280f4e903b4a4a56583c1fda7d2d44c;hb=763546fea509a5272d4cc33e5367ec3e2c1faaa7;hp=7a2b7dfe1a4a9b51395bd23cf3e83090c140745a;hpb=7c12da8d4fa65c8ce53d24784aca5ceff77f60c1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 7a2b7dfe1a..4635f991c2 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1976,6 +1976,7 @@ class OutputPage extends ContextSource { * @deprecated since 1.27 Use setCdnMaxage() instead */ public function setSquidMaxage( $maxage ) { + wfDeprecated( __METHOD__, '1.27' ); $this->setCdnMaxage( $maxage ); } @@ -4021,6 +4022,13 @@ class OutputPage extends ContextSource { return; } + if ( isset( $logo['svg'] ) ) { + // No media queries required if we only have a 1x and svg variant + // because all preload-capable browsers support SVGs + $this->addLinkHeader( '<' . $logo['svg'] . '>;rel=preload;as=image' ); + return; + } + foreach ( $logo as $dppx => $src ) { // Keys are in this format: "1.5x" $dppx = substr( $dppx, 0, -1 );