• Resolved echoleaf

    (@echoleaf)


    For ‘Eliminate render-blocking CSS?’, I have the box checked and I paste my above-the-fold CSS into the textarea. But when I save the settings or save & clear cache, the textarea is blank after the page reloads.

    Is this the way it’s supposed to work?

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

    (@optimizingmatters)

    obviously not 🙂

    most likely cause; a “web application firewall” (or similar component/ plugin) suspects paths like wp-content/themes/yourtheme/css/../images/background.jpeg to indicate a directory traversal attack. in that case “solve” those URL’s (for background images or font-files) to wp-content/themes/yourtheme/images/background.jpeg and you should be good to go 🙂

    hope this helps,
    frank

    Thread Starter echoleaf

    (@echoleaf)

    Turns out Sitelocity encloses their css in <style> tags – that was the problem!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    ah, good to know! 🙂

    Hey Laszlo, so how did you solve it? I tried removing the <style> and it still wouldn’t let me? I am using Sitelocity as well.

    Thread Starter echoleaf

    (@echoleaf)

    Did you remove the style tag at the end too?

    fwiw, I ended up not using critical css because it introduced a big layout shift that wasn’t there before.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    indeed, no opening or closing style tag + you might have to change image or font URL’s in the generated CSS (see above).

    re. layout shifts; that depends on the quality of the generated critical CSS, try generating it elsewhere maybe?

    Thread Starter echoleaf

    (@echoleaf)

    Or ‘generate’ it by hand…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    indeed 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Autoptimize not saving critical css’ is closed to new replies.