Support » Plugin: Autoptimize » Defer unused CSS

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Interesting. This indeed is a new suggestion in the revamped GPSI which I noticed the day before yesterday for my own sites.

    The reason for that is that when you’re using “inline & defer” (potentially with the automated critical CSS plugin) the critical CSS is inlined and the full CSS is technically not deferred any more but “preloaded” meaning it is loaded without it being render-blocking. The advantage of using “preload” is that the page below the fold is rendered as soon as possible wihtout being render blocking. If it was deferred (as AO used to do a couple of versions ago) the chance was bigger that the user scrolled down to a part of the page that was not styled yet. Given the fact that preloading the full CSS does not block rendering, there is little advantage to be found in deferring it instead and the disadvantage might be significant.

    hope this clarifies,
    frank

    Hello,
    thanks for the quick answer…
    ok, that means for me that this hint is not a disadvantage for my site and my settings are correct?
    Daniel

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that means for me that this hint is not a disadvantage for my site and my settings are correct?

    Confirmed!

    I will discuss this with the brains behind criticalcss.com, whom I consider an expert in all matters related to CSS optimization!

    Just wanted to chime in here and mention that the same thing is happening to me in GPSI. I’m also using the CriticalCSS plugin.

    While the it says “Defer unused CSS” it also says “Remove unused rules from stylesheets to reduce unnecessary bytes consumed by network activity.” so I think it means if your stylesheet includes (too many) rules that are not used on the current page then you’re gonna get that message.
    I guess Google doesn’t like 1 stylesheet for all pages and instead wants you to load a different, albeit tiny, stylesheet for every page on your site.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I think it means if your stylesheet includes (too many) rules that are not used on the current page then you’re gonna get that message.

    From a theoretical point of view that indeed makes a lot of sense, but the Google Developers documentation on that topic does not mention this at all, it just discusses how to defer CSS (somewhat ironically pointing to loadCSS, which is what AO uses to defer).

    frank

    I did a GPSI and got a list of unused CSS. I delete unused Autopitmize CSS in my FTP site. but it come back.
    How do I delete it permanently?
    Gary

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    How do I delete it permanently?

    by reviewing the original CSS (as provided by themes & plugins) randeeo1 🙂

    Thank you for the response.
    But when I run a GPSI report it gives me a list of unused autopimize css.
    here are a few. …css/autoptimize_b904556….css …css/autoptimize_single_e4429e3….css css/autoptimize_single_b10dd40….css
    .
    So I found these files in my ftp folder under autoptimize/css.

    I deleted these files, but they come back.
    where do I need to go to remove permanently? which file?

    Thanks
    Gary

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I deleted these files, but they come back.

    obviously, as AO simply aggragates the CSS that your theme & plugins add to the HTML.

    where do I need to go to remove permanently? which file?

    as I wrote earlier; in the original CSS (as provided by themes & plugins).

    my suggestion: don’t obsess over GPSI “opportunities” but focus on real spead (time to first byte, time to start render/ significant paint, onLoad time, …) instead 🙂

    hope this clarifies,
    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    it seems as though google rolled their recent changes back, scores are back to where they were before the weekend?

    hi Admin, on this website The Growing Tech I am also getting unused Css scenario. Can you please guide how can I improve the Mobile Page Score. Desktop Page score is almost 96 but Mobile Page Score is around 76. Hw can I solve this issue?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    better start your own topic next time @barcatechnology, this is a really old resolved one 🙂

    Regarding “remove unused CSS”: this is a Google Pagespeed Insight opportunity which can only be targeted by … removing CSS from your theme or plugin’s original CSS-files I’m afraid. I wouldn’t worry to much about it though 🙂

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.