• Resolved csit

    (@calmsmile)


    always load this file /wp-content/plugins/block-visibility/dist/block-visibility-frontend-styles.css but some pages and posts has not use the Block Visibility block. the seo plugin notice me to remove unnecessary css file

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Diego

    (@ndiego)

    Hi @calmsmile, you are correct, that is definitely an optimization that can be made and I will add it to my list for the next version. It’s a little tricky to detect if there is a block on the page that uses Block Visibility without impacting performance, but this is something that I will look into.

    In the meantime, there are a few solutions that might work for you. This file will only load if the Screen Size control is active in the plugin settings (Visibility Controls tab). If you never use the Screen Size control, you can got ahead and disable it. Also, you can disable this frontend CSS in the Screen Size control section of the plugin settings (Visibility Controls tab). This will require you to add the necessary CSS to your theme if you want to use the Screen Size control, but the option it is available.

    Let me know if I can help further.

    Nick

    Plugin Author Nick Diego

    (@ndiego)

    Hi @calmsmile, I just wanted to provide a followup on this. In the next version, coming out next week, that extra file has been removed. Screen size styles are also now conditionally loaded only if there are actually blocks using those settings.

    Thanks again for the feedback.

    Best,
    Nick

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘why the all page and posts always load an empty css file’ is closed to new replies.