• Resolved mrprainx

    (@mrprainx)


    Hello. First of all: thank you again for this great plugin.

    I’m struggling with some I would say “logical” aspects of the Critical CSS and Inline and Defer options.

    First question: If I set manual rules in the Critical CSS tab, what’s the fate of the css inserted in the “Eliminate render-blocking CSS?” setting?

    Second question: What’s the function of the “Edit Default Rule CSS” option in the Critical CSS tab? By logic I would assume it’s a CSS that should be considered critical on the whole website (and in this case…again as in the first question…what about the “Eliminate render-blocking CSS?” setting?). But every time I try to change it and save…nothing change. If I open that option again I find the CSS code I had before the changes.

    Third question: I have a CPT named “Podcast” whose permalink is mywebsite.com/podcast/name-of-the-podcast. I’ve set a rule for all the podcast posts. And I’ve set a rule for the specific page mywebsite.com/podcast/ which is the archive for the podcasts. This rule for the archive is overriding the one for the podcast itsel, thus resulting that the critical css recalled for a single podcast is actually the archive one. How can I get out of this impasse? I thought that an exact URL match would be enough.

    Thank you.

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

    (@optimizingmatters)

    1. manual rules override the “above the fold CSS”
    2. “default rule css” is the exact same thing as the “above the fold CSS”
    3. that’s a difficult one; path-based rules take precedence over conditional ones. best would be to not have the path-based rule for the archive, relying on is_archive instead?

    hope this helps,
    frank

    Thread Starter mrprainx

    (@mrprainx)

    Hello Frank. Thanks for the answer.

    1 and 2 definitely help.

    3 doesn’t because if I set the archive for is_archive and the podcast for podcast…the podcast critical css is retrieved also for the archive. That’s weird.

    Is there a way to use URL parameters to refine the paths? Because the issue is true also for custom taxonomies, something like
    mywebsite.com/custom-taxonomy/value
    mywebsite.com/custom-taxonomy/value2
    etc.

    I imagine something like
    mywebsite.com/custom-taxonomy/
    matches exactly the URL
    mywebsite.com/custom-taxonomy/*
    matches every value that has this base URL

    etc.

    Thank you again.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, a path-based rule with a longer path takes precedence over one with a shorter path, so that’s another thing you could try?

    Thread Starter mrprainx

    (@mrprainx)

    Yes, that works. I was hoping for the chance to use jolly characters to avoid remembering to add a new rule for every custom taxonomy value, present and future. Eheh.

    Thank you Frank!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! ??

    enjoy your evening!
    frank

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Critical CSS vs Inline and Defer’ is closed to new replies.