jenkins-bot has submitted this change and it was merged. Change subject: Prefetch $wgCentralAuthLoginWiki DNS ......................................................................
Prefetch $wgCentralAuthLoginWiki DNS Insert a <link rel=dns-prefetch href=...> tag in the page HTML for anons, so that the browser can get to work on resolving the domain name of $wgCentralAuthLoginWiki sooner. Bug: T92864 Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca --- M includes/CentralAuthHooks.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index ed7ea8e..4283266 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -984,6 +984,15 @@ // For non-JS clients. Use WikiMap to avoid localization of the // 'Special' namespace, see bug 54195. $wiki = WikiMap::getWiki( wfWikiID() ); + + $loginWiki = WikiMap::getWiki( $wgCentralAuthLoginWiki ); + if ( $wiki->getCanonicalServer() !== $loginWiki->getCanonicalServer() ) { + $out->addHeadItem( 'centralauth-dns-prefetch', Html::element( 'link', [ + 'rel' => 'dns-prefetch', + 'href' => preg_replace( '/^https?:/', '', $loginWiki->getCanonicalServer() ), + ] ) ); + } + $params = array( 'type' => '1x1', ); -- To view, visit https://gerrit.wikimedia.org/r/292985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits