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!
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
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!
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
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!