• Resolved Generosus

    (@generosus)


    Good Day,

    We’d like to preload the combined CSS file generated by SiteGround Optimizer using an external method.

    In order to accomplish the above and to account for all of the combined CSS files generated by your plugin, we need to know what is the data-handle (i.e., style-handle) assigned to your file.

    The typical file in question is:

    /wp-content/uploads/siteground-optimizer-assets/siteground-optimizer-combined-css-(unique number).css

    Unfortunately, the method described at the top of your support section did not reveal a data-handle (i.e., style-handle) for the typical file in question.

    Help appreciated. Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support daniellaivanova

    (@daniellaivanova)

    Hello @generosus,

    To preload the combined CSS file generated by the SG Optimizer plugin, you should use the Preload Combine CSS option which is a part of the Frontend optimizations of the plugin.

    Best Regards,
    Daniela Ivanova

    Thread Starter Generosus

    (@generosus)

    Hi Daniela,

    Thanks for the quick reply. Yes, we’re familiar with that.

    So, are you saying your plugin does not have or generate a data-handle (i.e., style handle) for the siteground-optimizer-combined-css file?

    Again, thank you.

    Plugin Support Pavel Dosev

    (@pdosev)

    Hello @generous,

    We generate a handler for the style. However it isn’t a static one which you can use. It is dynamically assigned based on the content of the site. The way we generate it is as follows:

    $style_hash = md5( implode( ‘’, $content ) );

    As the handle will be different when regenerated, adding the data handler is not possible as once it’s regenerated the one you entered before that will no longer be the correct one.

    Thus the option to preload the CSS is through our plugin and the option Daniela outlined in the previous reply.

    Thread Starter Generosus

    (@generosus)

    Hi Pasel,

    Thank you for your reply. That’s exactly what we were looking for.

    Can you share the name of the handle generated by your plugin? (e.g., sgo-dynamic-css, etc.). Theoretically, it should not contain a number.

    Background on this topic: Avada (theme) also generates a dynamic CSS file which is represented by the handle “fusion-dynamic-css.” We can successfully use this handle to either preload or async Avada’s dynamic css files generated for our website using a third-party plugin such as Perfmatters. The plugin searches for and uses the most current, cached CSS file throughout our website without breaking any pages.

    Details: https://prnt.sc/57WUwPLSmb9m

    Again, your help or input is appreciated. We’re not coders or experts on this, so you patience with us is appreciated ??

    Thank you!

    Plugin Support Delyan Delov

    (@delyandelov)

    As my colleague Pavel mentioned, the handle is dynamically generated so I am afraid that it cannot be used as a constant.

    Thread Starter Generosus

    (@generosus)

    Hi Delyan,

    Thank you. Moving on ??

    Cheerio!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Need Data-Handle for Combined CSS File Generated by SG Optimizer’ is closed to new replies.