• Resolved Suki

    (@sukinoz)


    Possible CSS Minify cache-busting issue with GeneratePress and other plugin CSS

    Hi,

    We would like to report a possible cache-busting/invalidation issue related to LiteSpeed Cache → Page Optimization → CSS Minify.

    We are using WordPress with GeneratePress and some additional plugins. The issue is not limited to GeneratePress: we have observed the same behavior both with GeneratePress-related CSS, such as typography styles, and with CSS files loaded by another plugin.

    Observed behavior:

    1. With LiteSpeed Cache enabled and CSS Minify ON, some mobile browsers continue loading previous styles.
    2. Opening the same page in an incognito/private tab loads the correct updated styles.
    3. Clearing the browser cache/data on the affected mobile device also makes the updated styles appear.
    4. Using:
    ?LSCWP_CTRL=before_optm
    

    loads the correct updated styles.
    5. If we add generatepress to Page Optimization → Tuning → CSS Excludes, the GeneratePress-related issue is resolved.
    6. If we add the affected plugin CSS file to CSS Excludes, that plugin CSS issue is also resolved.
    7. Purging LiteSpeed cache alone does not reliably fix it for already affected mobile browsers.

    This makes us think the problem may not be invalid CSS output, but rather that the optimized/minified CSS generated by LiteSpeed is not getting a new URL/version/cache-key when the underlying CSS changes. As a result, browsers that already cached the previous LiteSpeed-generated CSS continue using it.

    In other words, the minified CSS itself may be valid, but its cache invalidation/cache-busting seems unreliable in this case.

    Could you confirm whether CSS Minify takes the original CSS version/query string/file modification time into account when generating the optimized CSS file URL/cache key?

    Is excluding GeneratePress and the affected plugin CSS files the recommended workaround, or is there a better way to force LiteSpeed to generate a new optimized CSS URL when the original CSS changes?

    Thanks.

Viewing 15 replies - 1 through 15 (of 25 total)
Viewing 15 replies - 1 through 15 (of 25 total)

You must be logged in to reply to this topic.