From: Ori Livneh Date: Tue, 18 Aug 2015 17:54:44 +0000 (-0700) Subject: Load all CSS in the top queue X-Git-Tag: 1.31.0-rc.0~10244^2~1 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=b7c0e537ebb7216cd12a6c48fbaee7c2c7757c55;p=lhc%2Fweb%2Fwiklou.git 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 --- 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';