Title: dynamic-mobmenu.css is uncacheable
Last modified: August 8, 2020

---

# dynamic-mobmenu.css is uncacheable

 *  Resolved [wpp87567](https://wordpress.org/support/users/robert1776/)
 * (@robert1776)
 * [6 years ago](https://wordpress.org/support/topic/dynamic-mobmenu-css-is-uncacheable/)
 * 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](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [6 years ago](https://wordpress.org/support/topic/dynamic-mobmenu-css-is-uncacheable/#post-13233853)
 * Hi [@robert1776](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/mobile-menu/assets/icon-128x128.png?rev=1890426)
 * [WP Mobile Menu - The Mobile-Friendly Responsive Menu](https://wordpress.org/plugins/mobile-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mobile-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mobile-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/mobile-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mobile-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mobile-menu/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/dynamic-mobmenu-css-is-uncacheable/#post-13233853)
 * Status: resolved