From b7c0e537ebb7216cd12a6c48fbaee7c2c7757c55 Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Tue, 18 Aug 2015 10:54:44 -0700 Subject: [PATCH] Load all CSS in the top queue As the waterfall chart in http://www.webpagetest.org/result/150817_ER_1E66/1/details/ clearly demonstrates, the for the bottom CSS queue is clearly render-blocking. The fact that it is in the bottom of only means the browser discovers it later, when its connection to the server is already saturated by requests for images that are referenced in the body HTML. Change-Id: Icf0968c5984f4d3c3dbac1c7e1d539052fa5bd74 --- includes/OutputPage.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 8d4720b610..80fd9aba41 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3073,10 +3073,6 @@ class OutputPage extends ContextSource { ResourceLoaderModule::TYPE_SCRIPTS ); - $links[] = $this->makeResourceLoaderLink( $this->getModuleStyles( true, 'bottom' ), - ResourceLoaderModule::TYPE_STYLES - ); - // Modules requests - let the client calculate dependencies and batch requests as it likes // Only load modules that have marked themselves for loading at the bottom $modules = $this->getModules( true, 'bottom' ); @@ -3668,7 +3664,7 @@ class OutputPage extends ContextSource { $otherTags = array(); // Tags to append after the normal tags $resourceLoader = $this->getResourceLoader(); - $moduleStyles = $this->getModuleStyles( true, 'top' ); + $moduleStyles = $this->getModuleStyles( true ); // Per-site custom styles $moduleStyles[] = 'site'; -- 2.20.1