Prioritize CSS - doesn't seem to be operational

83 views
Skip to first unread message

Chris Vanek

unread,
Nov 1, 2017, 6:02:27 AM11/1/17
to mod-pagespeed-discuss
Hi,

I've enabled "Prioritize Critical CSS" but I'm not having much luck with it - every Google page speed run on the domain shows all the Css files render blocking still.

When I run the debug I get the following:

The following filters were disabled for this request: 
CriticalSelectorFilter: No critical selector info in cache

Additionally below is the configuration file 

<IfModule !mod_version.c>


  LoadModule version_module modules/mod_version.so


</IfModule>




<IfVersion < 2.4>


  LoadModule pagespeed_module modules/mod_pagespeed.so


</IfVersion>


<IfVersion >= 2.4.2>


  LoadModule pagespeed_module modules/mod_pagespeed_ap24.so


</IfVersion>




<IfModule pagespeed_module>




  ModPagespeed on


  ModPagespeedEnableCachePurge on


  #Allow Any host for requesting data for the HTTPS


  ModPagespeedDangerPermitFetchFromUnknownHosts on




  # SSL Relax


  ModPagespeedFetchHttps enable,allow_self_signed,allow_unknown_certificate_authority,allow_certificate_not_yet_valid




  AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html




  ModPagespeedFileCachePath            "/var/mod_pagespeed/cache/"




  #ModPagespeedDisallow "*/theme-scripts-ck.js"  




  #ModPagespeedDisableFilters combine_javascript,combine_css,rewrite_images,inline_css,rewrite_css


  ModPagespeedEnableFilters extend_cache


  #ModPagespeedEnableFilters defer_javascript


  ModPagespeedEnableFilters prioritize_critical_css


  ModPagespeedEnableFilters rewrite_css,sprite_images




  ModPagespeedPermitIdsForCssCombining style*,font*,min*,*




  # Default Shared Memory Metadata Cache


  ModPagespeedDefaultSharedMemoryCacheKB 500000

 # ModPagespeedDomain

 # authorizes rewriting of JS, CSS, and Image files found in this

 # domain. By default only resources with the same origin as the

 # HTML file are rewritten. For example:

 #

 ModPagespeedDomain https://code.jquery.com

 ModPagespeedDomain https://fonts.googleapis.com

 #ModPagespeedDomain https://www.facebook.com

 ModPagespeedDomain https://www.gstatic.com

 ModPagespeedDomain https://apis.google.com

 ModPagespeedDomain https://maxcdn.bootstrapcdn.com


  # This will allow resources found on http://cdn.myhost.com to be

 # rewritten in addition to those in the same domain as the HTML.

 #

 # Wildcards (* and ?) are allowed in the domain specification. Be

 # careful when using them as if you rewrite domains that do not

 # send you traffic, then the site receiving the traffic will not

 # know how to serve the rewritten content.


  # Other defaults (cache sizes and thresholds):

 #

 ModPagespeedFileCacheSizeKb          5120000

 # ModPagespeedFileCacheCleanIntervalMs 3600000

 # ModPagespeedLRUCacheKbPerProcess     1024

 # ModPagespeedLRUCacheByteLimit        16384

 # ModPagespeedCssInlineMaxBytes        2048

 # ModPagespeedImgInlineMaxBytes        2048

 # ModPagespeedJsInlineMaxBytes         2048

 # ModPagespeedCssOutlineMinBytes       3000

 # ModPagespeedJsOutlineMinBytes        3000


  # Bound the number of images that can be rewritten at any one time; this

 # avoids overloading the CPU.  Set this to 0 to remove the bound.

 #

 ModPagespeedImgMaxRewritesAtOnce 150
 ModPagespeedNumExpensiveRewriteThreads 10

ModPagespeedLogRewriteTiming on

ModPagespeedLogDir /var/log/pagespeed

ModPagespeedStatisticsLogging on
ModPagespeedMessageBufferSize 100000

<Location /mod_pagespeed_beacon>

       SetHandler mod_pagespeed_beacon

 </Location>


    <Location /pagespeed_admin>

       Order allow,deny

       #Allow from all

       Allow from localhost

       Allow from 127.0.0.1

       Allow from 58.96.59.81

       Allow from 111.220.29.216

       SetHandler pagespeed_admin

   </Location>

   <Location /pagespeed_global_admin>

       Order allow,deny

       #Allow from all

       Allow from localhost

       Allow from 127.0.0.1

       Allow from 58.96.59.81

       Allow from 111.220.29.216

       SetHandler pagespeed_global_admin

   </Location>


  # Uncomment the following line if you want to disable statistics entirely.

 #

 ModPagespeedStatistics on


  # This page lets you view statistics about the mod_pagespeed module.

 <Location /mod_pagespeed_statistics>

     Order allow,deny

     # You may insert other "Allow from" lines to add hosts you want to

     # allow to look at generated statistics.  Another possibility is

     # to comment out the "Order" and "Allow" options from the config

     # file, to allow any client that can reach your server to examine

     # statistics.  This might be appropriate in an experimental setup or

     # if the Apache server is protected by a reverse proxy that will

     # filter URLs in some fashion.

     Allow from localhost

     SetHandler mod_pagespeed_statistics

 </Location>


</IfModule>



Joshua Marantz

unread,
Nov 1, 2017, 8:52:37 AM11/1/17
to mod-pagespeed-discuss
prioritize_critical_css requires several views of the page to warm up the cache.  And depending on your settings the server-side cache-warming you do by viewing your page in (say) Chrome may not warm the segment of the server-side cache that is needed to optimize requests from PageSpeed insights.  And because PSI has its own cache, just refreshing the PSI page might not trigger a new request.  You can tell when PSI is recomputing the page score by how slow it is.  If it's instant, it is using its own cache.

I always caution people from using PSI to determine whether MPS is working, as they are both complex systems.  But if you visit the prioritize_critical_css demo page and refresh it a few page in Chrome, you can see the resulting rewrite with view->page source.

The rewrite on your page should be similar, with the critical CSS inlined in the top, and the full CSS loaded slowly at the bottom.

-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/f9886785-a8a1-4178-8ab5-59a129d17671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted

Chris Vanek

unread,
Nov 2, 2017, 2:44:27 AM11/2/17
to mod-pagespeed-discuss
Hi Josh,

Thanks for responding - even after a full day of hundreds of refresh's as it's an active site, I've still experienced none of the CSS files being picked up by that filter.

Additionally, google page speed after multiple tests throughout the day has shown just about every single CSS file as render blocking - any thoughts how to narrow down into this some more?

Regards

Otto van der Schaaf

unread,
Nov 2, 2017, 3:15:58 AM11/2/17
to mod-pagesp...@googlegroups.com
Could you post (or pm us) a URL?

Otto

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/1b0f4cd9-54c1-4db3-8d15-ddc591f5746f%40googlegroups.com.

Chris Vanek

unread,
Nov 2, 2017, 7:39:39 PM11/2/17
to mod-pagespeed-discuss
I've made a response privately to author but I can't see it - so not sure it went through.


On Thursday, 2 November 2017 17:15:58 UTC+10, Otto van der Schaaf wrote:
Could you post (or pm us) a URL?

Otto
On Thu, 2 Nov 2017 at 07:44, Chris Vanek <ch...@centreforceit.com.au> wrote:
Hi Josh,

Thanks for responding - even after a full day of hundreds of refresh's as it's an active site, I've still experienced none of the CSS files being picked up by that filter.

Additionally, google page speed after multiple tests throughout the day has shown just about every single CSS file as render blocking - any thoughts how to narrow down into this some more?

Regards

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
Nov 3, 2017, 4:24:07 AM11/3/17
to mod-pagesp...@googlegroups.com
I had a look, and I'm actually not sure what happens. Critical css selectors are submitted back to mod_pagespeed, yet they never seem to effectively get used/inlined.
Some more research is required to figure out what is going on, but at the moment I have some other things on my plate that I need to be take care of first.

Otto

On Fri, Nov 3, 2017 at 12:39 AM Chris Vanek <ch...@centreforceit.com.au> wrote:
I've made a response privately to author but I can't see it - so not sure it went through.


On Thursday, 2 November 2017 17:15:58 UTC+10, Otto van der Schaaf wrote:
Could you post (or pm us) a URL?

Otto
On Thu, 2 Nov 2017 at 07:44, Chris Vanek <ch...@centreforceit.com.au> wrote:
Hi Josh,

Thanks for responding - even after a full day of hundreds of refresh's as it's an active site, I've still experienced none of the CSS files being picked up by that filter.

Additionally, google page speed after multiple tests throughout the day has shown just about every single CSS file as render blocking - any thoughts how to narrow down into this some more?

Regards

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/d3e67d2a-271b-43f7-8861-6fb012e685ae%40googlegroups.com.

Chris Vanek

unread,
Nov 6, 2017, 8:21:48 AM11/6/17
to mod-pagespeed-discuss
Hi Otto,

Just thought I'd add here while not all the CSS has combined properly or gone critical, it seems to be fluctuating awkwardly? Especially for mobile devices anyway when checking against google page speed.

Regards


On Friday, 3 November 2017 18:24:07 UTC+10, Otto van der Schaaf wrote:
I had a look, and I'm actually not sure what happens. Critical css selectors are submitted back to mod_pagespeed, yet they never seem to effectively get used/inlined.
Some more research is required to figure out what is going on, but at the moment I have some other things on my plate that I need to be take care of first.

Otto

On Fri, Nov 3, 2017 at 12:39 AM Chris Vanek <ch...@centreforceit.com.au> wrote:
I've made a response privately to author but I can't see it - so not sure it went through.


On Thursday, 2 November 2017 17:15:58 UTC+10, Otto van der Schaaf wrote:
Could you post (or pm us) a URL?

Otto
On Thu, 2 Nov 2017 at 07:44, Chris Vanek <ch...@centreforceit.com.au> wrote:
Hi Josh,

Thanks for responding - even after a full day of hundreds of refresh's as it's an active site, I've still experienced none of the CSS files being picked up by that filter.

Additionally, google page speed after multiple tests throughout the day has shown just about every single CSS file as render blocking - any thoughts how to narrow down into this some more?

Regards

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages