prioritize_critical_css randomly works

52 views
Skip to first unread message

John

unread,
May 1, 2015, 11:07:50 AM5/1/15
to mod-pagesp...@googlegroups.com
I've been trying to use pagespeed for a site, but have been encountering mixed results. When it works, it is fantastic, but unfortunately it only seems to work on some page loads. The particular issue that I am facing is the use of prioritize_critical_css. On around 1/7 page loads it actually works and inlines the critical css. On the other loads it seems to just let the page load normally as if the filter wasn't enabled.

Some patterns I've noticed is that if it loads, it usually will stay loaded for a couple of page reloads afterwards. When testing the pagespeed tool from Google, the results are more like 1/20 page loads.

I've noticed similar occurrences with other filters, but as they aren't as critical to my site, I would like to address this one first. When I check the headers on the site I see that pagespeed is indeed running.

Note that my main site is on http://www.example.com and the css is delivered from http://www.example_static.com. Both domains are listed in the pagespeed.conf file.

Can anyone help me to debug this issue.

Jan-Willem Maessen

unread,
May 1, 2015, 5:22:43 PM5/1/15
to mod-pagesp...@googlegroups.com
Hi John -

My first guess (given that you *sometimes* see the optimization applied) is that property cache data is being flushed from cache before it gets reused.  This data should live forever if you don't have cache pressure.  Note that once this data is flushed it'll take a couple of accesses to your page to get it back again (one or two to optimize the CSS and return a fully-optimized instrumented page, one to actually inline the optimized critical CSS).  Are you using a file-based cache (the default)?  If so, what do you see in:
   ...path to cache.../prop_page/

My second guess is that you're not running the beacon instrumentation code when you visit your pages.  In particular, this instrumentation does not run and send results back to mod_pagespeed if you *just* visit the page from PageSpeed Insights.  I tried this experiment by visiting:


In PageSpeed Insights, and several visits showed fully optimized CSS but warned that the CSS was render-blocking.  By visiting the page once from my web browser I was able to get beacon data back to modpagespeed.com and the next run of PageSpeed Insights gave 100/100 for speed.

-Jan

--
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/19b910fe-1315-4ab7-93b9-08c2d590e0b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages