Exclude few CSS files to preload them but still combine them.
Wordpress LScache Plugin: Exclude few CSS files to preload them but still combine them.
Hi, I want to exclude some important CSS files from loading asynchronously. But still, I want them to combine into one single file. I have around 14 CSS files that need to preload and I want to combine them as well. I cant find any option in Litespeed Cache for this. I just want to know, can it be achieved using some custom code? And, My suggestion is to add such extra functionalities in the exclude section. I hope it will be added in future updates. Unrelated from what you want it is absolutely contradictory to load CSS async and preload at the same time. Async loading of CSS causes a kind of deferred loading what causes content shifting and content shifting causes bad Pagespeed score, so why to preload CSS if you simultaneously want to load the same sources to be loaded deferred? CSS files that are loaded from your own server should never be loaded async or deferred, but they should pe preloaded and nothing else. Async is good for loading of external soures to prevent blocking page rendering, but your own files, especially CSS, should be prioritized. Combine them all and preload the single css file. Not everything in cache plugin that can be enabled causes a faster loading of your page. Hi, the closest approach I can think of is CSS combine + generate UCSS + inline UCSS best regards, @CacheCrawler I liked your answer and I agree. The only thing I wanted here is that loading all the CSS files will result in larger render-blocking than loading just a few imp CSS files early. Your suggestion works better. Your Idea saves a lot of time than my Idea. Thanks! @CacheCrawler Thank You for your Suggestion. With Only Litespeed, I have to exclude a few CSS files from combining bcoz it breaks the page layout. A exclude feature to just exclude from combine list but still minify all the CSS files is needed. CSS combined with Unique CSS is good or bad? unfortunately when excluded , it is excluded from both combine and minify , but if its just few files , the minification may not really have huge impact after all yes , you should try to enable UCSS if its possible.
Do you need help?
We are online almost any time and ready to answer any question. The answer to your question will come faster than it takes you to release the mouse button. Ask A Question