Home Forums WoodMart support forum Assistance Needed: Dynamically Generated Theme CSS Files and CDN Caching

Assistance Needed: Dynamically Generated Theme CSS Files and CDN Caching

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #706774

    ivoltbg
    Participant

    Hello,

    I am experiencing an issue with the WoodMart theme on my website (ivolt.bg) related to dynamically generated CSS files, such as:

    xts-theme_settings_default-1769689225.css

    These files are generated dynamically by the theme on each page load and do not exist as physical files on the server. As a result, enabling a CDN (I am using SiteGround CDN) causes caching issues and the theme CSS sometimes fails to load, resulting in console errors.

    I have discussed this issue with SiteGround support, and here is a summary of their advice: the CDN cannot exclude these dynamic files using a path or wildcard. They suggested using the following .htaccess directive to prevent caching:

    <If "%{REQUEST_URI} =~ /filename.php$/">
        <IfModule mod_headers.c>
            Header set Cache-Control "private"
        </IfModule>
    </If>

    However, they noted that inserting .css file path may not work as intended, since there is no physical file, and the file name changes dynamically with each execution.

    They advised that the correct way to handle this is to contact you, as you are familiar with the theme’s file structure and can confirm which file(s) should be excluded from caching.

    I also noticed that another WoodMart customer had a similar issue, which is discussed here:
    https://xtemos.com/forums/topic/xts-theme-setting-failed-to-loadresource/

    I need your assistance with this issue. Could you please help me:
    1) Which exact file or path should be excluded from caching to prevent this problem?
    2) Is there an official way within the theme to handle dynamically generated CSS files so they work correctly with a CDN?

    Any guidance on this matter would be greatly appreciated.

    Thank you in advance for your support.

    Kind regards,
    Nikola Bardukov

    #706912

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    1. The exact file path pattern in the following /wp-content/uploads/[year]/[month]/xts-theme_settings_default-[timestamp].css. With the year, month and the timestamp of the moment when the file was generated.

    2. They work without any problems with CDN by default. Probably, you have an issue with your caching plugin (not CDN). Please try to disable all the plugins that are not related to our theme and test how it works.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)