• Resolved Albert Albs

    (@albertalbs)


    Hi,

    I found, without using this plugin anywhere on the posts and pages, still it is loading the CSS in all pages. Especially the animation related CSS is huge. I can turn off that. But Main css is loading in all pages.

    Is there anyway, can you guys load the necessary files only on the page where it is used and with optimized code?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @albertalbs,

    Thank you for your feedback. We will take care of it in the upcoming versions, as we start to optimize the CSS.

    For the animations, I don’t think we can do much as there’s no way to know when a block is using animations. But we will look into it too and see how we can improve this process.

    Once again, thank you for bringing it to our attention. ??

    Hi,

    I’d like to second that request. Right now, there are post-$post_id.css created for all posts, even though Otter is not being used. These empty files are loaded on each page load, which is danging performance.

    It would be nice to have:
    – a filter to disable the post CSS creation altogether
    – post CSS only creating files when Otter blocks are being used and when there’s actual CSS to put in these files.

    Thank you,
    Matt

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @skyminds,

    We will take that into our logs to make sure empty CSS isn’t created. For your first request, why would one want to disable the creation of CSS as that’s bad for the website optimization? Let us know. ??

    Hi @hardeepasrani

    Thanks for taking the request into consideration.

    Why would one want to disable the creation of CSS as that’s bad for the website optimization?

    Well, the fewer files the site requests, the quicker it loads. If there’s no need to create/load files when Otter is not being used on a post, I don’t see why files should be loaded. Hope it clarifies my thinking.

    Cheers,
    Matt

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    @skyminds Yea, I do get to not load it when Otter isn’t being used. There’s an option to delete all CSS files in Settings > Otter. We can do it automatically when one deactivates the plugin but that can be bad because a lot of people disable plugins for testing and such. ??

    Yes, I tried that delete all CSS option but the files are recreated instantly.

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @skyminds,

    Yea, they’re when the user visits the page but we will fix that to make sure they’re not generated when no Otter blocks are being used.

    Thank you @hardeepasrani – is there a public roadmap for Otter blocks?

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @skyminds,

    The roadmap is currently not public but all the issues are here: https://github.com/Codeinwp/gutenberg-blocks/issues

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Performance Issue: Unused CSS is loading on all pages’ is closed to new replies.