Inline and defer CSS
-
Hi,
I have a WP multisite of 6 sites. Also I have a devel web which is the copy of 1 of that sites. Google Pagespeed results are very poor, so I am testing Inline and defer CSS option of Autoptimize. I inserted critical css and inserted this code to functions.php to defer css only on homepage.
function critical_css_only_on_homepage() { if (is_front_page()) { return true; } else { return false; } } add_filter('autoptimize_filter_css_defer', 'critical_css_only_on_homepage', 10, 1);On devel web it reduced First Contentful Paint time by 0,8s for mobile and 0,2s for desktop. However on multisite web First Contentful Paint time remains the same. Autoptimize configuration is enabled per site and I added different critical css for each of that 6 sites. Where could be the problem?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Inline and defer CSS’ is closed to new replies.