Title: Load CSS Asynchronously per post type
Last modified: July 31, 2025

---

# Load CSS Asynchronously per post type

 *  Resolved [mcdeth](https://wordpress.org/support/users/mcdeth/)
 * (@mcdeth)
 * [10 months ago](https://wordpress.org/support/topic/load-css-asynchronously-per-post-type/)
 * Hi, how can I set one css per post type, with 20k products I have constantly 
   URL list in CCSS in queue waiting.
 * I’ve already set
 * add_filter(‘litespeed_ucss_per_pagetype’, ‘__return_true’);
 * and CCSS Per URL is off
 * thanks

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

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [10 months ago](https://wordpress.org/support/topic/load-css-asynchronously-per-post-type/#post-18580802)
 * the filter you used is for UCSS , you are talking about CCSS ?
 * please clarify which one that you are trying to do with
    -  This reply was modified 10 months ago by [qtwrk](https://wordpress.org/support/users/qtwrk/).
 *  Thread Starter [mcdeth](https://wordpress.org/support/users/mcdeth/)
 * (@mcdeth)
 * [10 months ago](https://wordpress.org/support/topic/load-css-asynchronously-per-post-type/#post-18581235)
 * Yes, sorry about the confusion. Ideally, I’d prefer to have one CSS file per 
   post type in both cases, for UCSS and CCSS.
 * However, it seems like the settings are being ignored. Currently, I can see that
   multiple products are being included in the CSS queue for both post types.
 * [https://sendapic.xyz/view/uNiNPd](https://sendapic.xyz/view/uNiNPd)
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [10 months ago](https://wordpress.org/support/topic/load-css-asynchronously-per-post-type/#post-18581318)
 * [@mcdeth](https://wordpress.org/support/users/mcdeth/) 
   UCSS will contain only
   the CSS needed to show the page correctly. This will fix the issue, and remove
   extra CSS from page.CCSS will contain the CSS needed to show the above the fold(
   first screen when you navigate to page). This will speed up the loading.They 
   cannot be combined, they are added in different locations
 *  Thread Starter [mcdeth](https://wordpress.org/support/users/mcdeth/)
 * (@mcdeth)
 * [10 months ago](https://wordpress.org/support/topic/load-css-asynchronously-per-post-type/#post-18581321)
 * Yes, I understand that UCSS and CCSS serve different purposes and are different.
 * My question is independently more about the expected behavior when using 1 UCSS/
   CCSS per post type.
 * If we have UCSS set per post type, why are multiple product pages still being
   queued for UCSS generation? Shouldn’t only one representative product be used
   for generating UCSS for that post type?
 * Similarly, with CCSS per post type, shouldn’t only one product page be used for
   generating CCSS for the entire “product” post type, instead of queuing multiple
   products?
 * What I’m worried is:
    1. having multiple UCSS/CCSS for products
    2. killing my quota on account because its constantly generating for products duplicate
       ucss OR ccss
 * Is this normal behavior, or is something not being respected in the configuration?
    -  This reply was modified 10 months ago by [mcdeth](https://wordpress.org/support/users/mcdeth/).
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [10 months ago](https://wordpress.org/support/topic/load-css-asynchronously-per-post-type/#post-18581787)
 * I just looked at the code, if I am not mistaken , it is always queued , but before
   sending to QC nodes , it will check UCSS locally first

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

The topic ‘Load CSS Asynchronously per post type’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [10 months ago](https://wordpress.org/support/topic/load-css-asynchronously-per-post-type/#post-18581787)
 * Status: resolved