• Hello

    After installing this plugin and integrating criticalcss the GTMETRIX score of my website is slower than before.

    GTMETRIX: “The following external resources have small response bodies. Inlining the response in HTML can reduce blocking of page rendering.

    https://—–.com/ should inline the following small resources:

    https://——.com/wp-content/cache/autoptimize/css/autoptimize_29beb9de513515c00a558566516f2bef.css”

    Is there any way to fix this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter mmsosa

    (@mmsosa)

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, the real performance impact is minimal (a.o. because the full CSS is loaded in a non-render-blocking manner) but if you absolutely need/ want to tackle you could set the media-type of wp-content/themes/gridlove-child/style.css to all instead of screen to ensure it gets aggregated with the rest of the CSS ??

    hope this helps,
    frank

    Thread Starter mmsosa

    (@mmsosa)

    How can I set media-type to all instead of screen?

    before install criticalcss

    View post on imgur.com

    after install criticalcss

    View post on imgur.com

    How is this possible?

    I thought the website was going to improve speed

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    How can I set media-type to all instead of screen?

    check with whomever created your child theme; the CSS is enqueued with media-type screen (probably in functions.php) if you(r developer) change that into all (or leave it un-specified) it will be aggregated with the rest.

    How is this possible? I thought the website was going to improve speed

    critical CSS specific aim is to (make the CSS not render-blocking and that way) improve the start render/ first paint times and only that, check results on the “timings” tab in GTmetrix ??

    frank

    Thread Starter mmsosa

    (@mmsosa)

    change it

    function gridlove_child_load_scripts() {	
    	wp_register_style('gridlove_child_load_scripts', trailingslashit(get_stylesheet_directory_uri()).'style.css', false, GRIDLOVE_THEME_VERSION, 'screen');
    	wp_enqueue_style('gridlove_child_load_scripts');
    }

    to this

    function gridlove_child_load_scripts() {	
    	wp_register_style('gridlove_child_load_scripts', trailingslashit(get_stylesheet_directory_uri()).'style.css', false, GRIDLOVE_THEME_VERSION, 'all');
    	wp_enqueue_style('gridlove_child_load_scripts');
    }

    Is this ok?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    yes, that looks OK at first sight ??

    hi, please, print it again after the chage.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Inline small CSS’ is closed to new replies.