Wordpress LScache Plugin: Load CSS Asynchronously ? Causing background issues
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi, I am using the litespeed plugin and the Divi theme. Whenever the setting Load CSS Asynchronously is on, the background color of my first section and the background color of my button changes to some default setting or something. When this is off, there are no issues. I tried to use the data-no-async=1 attribute to add with the following code: (function() const loadFirstCss = document.querySelectorAll(#custom-no-async) const arrayCss = [...loadFirstCss] //Array Prototypes here! arrayCss.forEach(element => element.setAttribute( data-no-async , 1 ) ) )() But this doesnt have any effect. I can see in the HTML code its being added however. Any ideas on why this is happening and how to fix it? Ofcourse I can disable the feature but its not ideal. Thank you The page I need help with: http://foryourit.nl Hi, Could you please try enable load async css, but disable critical CSS , purge all , and see how it goes ? Best regards, Hi, Thank you, this did the trick. Should I still use the javascript fuction to add the async attribute? Can you maybe tell more about the background information why this works like this? Thank you! Hi, I am not sure. do you actually see data-no-async = 1 in your css link ? you may need to add it BEFORE our plugin start to optimize the page , because if you add it AFTER optimization is finished , it wont have any effect Best regards, Hi, Im going to mark this topic Resolved , due to lack of activity. If you still need help, please feel free to re-open it. Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference