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 <link rel=stylesheet> for the bottom CSS queue is clearly
render-blocking. The fact that it is in the bottom of <body> 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
This commit is contained in:
Ori Livneh 2015-08-18 10:54:44 -07:00
parent 29969fa0dd
commit b7c0e537eb

View file

@ -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 <link> tags
$resourceLoader = $this->getResourceLoader();
$moduleStyles = $this->getModuleStyles( true, 'top' );
$moduleStyles = $this->getModuleStyles( true );
// Per-site custom styles
$moduleStyles[] = 'site';