• Resolved wpp87567

    (@robert1776)


    I may be missing the logic behind this, but why does the wp_enqueue_style() call for dynamic-mobmenu.css append a random value to the version string on each load?

    In class-titan-css.php:

    wp_enqueue_style(
        'tf-compiled-options-' . $this->frameworkInstance->optionNamespace,
        $this->getCSSFileURL(),
        '',
        WP_MOBILE_MENU_VERSION . '-' . rand( 100, 999 )
    );

    This makes the file completely uncacheable.

    Can this be modified to instead append something like the timestamp of the last configuration change? Or a hash? I’ve removed the appended value entirely for my purposes but this will not suffice if I have to change the settings.

Viewing 1 replies (of 1 total)
  • Plugin Author Rui Guerreiro

    (@takanakui)

    Hi @robert1776,

    You are right. The rand() function doesn’t make sense anymore since it was used before having the constant of the latest WP Mobile Menu version.

    You can change it the following code that I will release in the next update.

    wp_enqueue_style(
        'tf-compiled-options-' . $this->frameworkInstance->optionNamespace,
        $this->getCSSFileURL(),
        '',
        WP_MOBILE_MENU_VERSION )
    );

    Thanks for the heads up.

Viewing 1 replies (of 1 total)

The topic ‘dynamic-mobmenu.css is uncacheable’ is closed to new replies.