• Resolved Vishal Lohar

    (@vlohar08)


    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 can’t 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    the closest approach I can think of is CSS combine + generate UCSS + inline UCSS

    best regards,

    Thread Starter Vishal Lohar

    (@vlohar08)

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

    @qtwrk Thank You for your Suggestion.

    Thread Starter Vishal Lohar

    (@vlohar08)

    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?

    • This reply was modified 2 years, 7 months ago by Vishal Lohar.
    Plugin Support qtwrk

    (@qtwrk)

    unfortunately when excluded , it is excluded from both combine and minify , but if it’s just few files , the minification may not really have huge impact after all

    yes , you should try to enable UCSS if it’s possible.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude few CSS files to preload them but still combine them.’ is closed to new replies.