• Resolved newbie2004

    (@newbie2004)


    Hi,

    I’m using Rich Shortcodes for Google Reviews version 6.6.2 with WP Rocket.

    The file /wp-content/plugins/widget-google-reviews/assets/css/public-main.css is always automatically added to the CSS safelist in WP Rocket, which affects the site’s performance.

    If I remove it, it’s automatically added back later.

    How can I prevent this?

    Best regards,

    newbie2004

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Daniel K.

    (@richplugins)

    Hi @newbie2004,

    Thank you for your topic.

    Yes, we had huge issues with WP Rocket, because it doesn’t update plugin’s assets (js/css) if the plugin has a new version (however it must) and we decided to include our main style file to a safelist automatically.

    But it seems sometime is not necessary and it seems we need to make a special option in the settings to exclude this logic, what do you think?

    Thanks!

    Thread Starter newbie2004

    (@newbie2004)

    Hi Daniel,

    thank you for your feedback and your suggestion.

    That would be great if you can offer that option in a forthcoming version.

    Br,

    newbie2004

    Plugin Author Daniel K.

    (@richplugins)

    Hi @newbie2004,

    Thanks for your answer!

    We’ve started working on implementing this option, but it also made us wonder -is it really needed? If we allow disabling the automatic safelist addition, it may cause styling issues in some cases (specially for dynamic (ajax) contents), so we’d like to better understand the reason behind this request. Could you please briefly explain your use case or why this option would be helpful for you?

    Thanks!

    Thread Starter newbie2004

    (@newbie2004)

    Hi Daniel K.,

    Thanks for bringing this up again.

    The idea is simply to avoid unnecessarily increasing the website’s loading time by adding the entire CSS file, which is over 20 kB, to the safelist.

    If problems arise, then selectively choosing the classes for the CSS safelist would be much better, in my opinion, to exclude only the ones causing issues.

    Alternatively, with your approach mentioned above, one could still enable adding the entire CSS file in the options, or simply add it manually in its entirety to the CSS Safelist of WP Rocket.

    Best regards,
    newbie2004

    Plugin Author Daniel K.

    (@richplugins)

    Hi @newbie2004,

    Thank you for your detailed explanation.

    This option has been added in the latest version 6.7.

    Please let us know if you have any questions.

    Thanks!

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

The topic ‘Prevent automatic addition of public-main.css to WP Rocket’s CSS safelist’ is closed to new replies.