Disable CSS/JS cache




Wordpress LScache Plugin: Disable CSS/JS cache

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, After i install lite speed cache i have problems whit load more buttons on my web site. If i PURE ALL CSS/JS Cache, load mote button will work just fine. Is it any way that i can disable CSS/JS cache? i was try to find this option in settings, but i can not find it. Thank you! The page I need help with: https://dizajnarena.com/projekti/ Hi @boka003, LiteSpeed server will not cache CSS and JS as they are a static file but our plugin can do optimization on both scripts, you can check the setting on LiteSpeed Cache > Setting > Optimize The load more buttons problem should related to JS Minify or JS Combine, you can check on this article to find out the bug. Hello, I have try metod above and onlythink that i find is this admin-ajax.php http://prntscr.com/q5yf64 Button load more is at end of page, called UCITAJ JOS Is my problem with admin ajac cache? Thank you! You are right, the issue is from admin-ajax and the ajaxNonce is expired due to the page cache. Could you try to make the Public Cache TTL shorter(28800) to see does it help? Hello, i have change this value: http://prntscr.com/q6ggdt But it is still same, only if i logged in wp-admin, load buttons work. But other users (who are not logged in) have problem with load more buttons. Ok, is that load more function from your theme or a widget? And do you know where does the dtLocal JS variable generated? It is my theme function. Sorry, but i dont know where is that dtLocal JS variable generated, is there any way how i can check that? @boka003, please try to put the following code on your themes functions.php and turn ON ESI, these codes can replace your ajax nonce to fresh nonce. LiteSpeed_Cache_API::hook_tpl_esi(wp_create_nonce_esi, nonce_esi ) function nonce_esi() echo wp_create_nonce() exit function html_nonce_replacement($buffer) if ( ! isset( $_GET[ lsesi ] ) ) $ajaxNonce_position = strpos($buffer, ajaxNonce) + 12 $original_nonce = substr($buffer, $ajaxNonce_position, 10) $esi_url = LiteSpeed_Cache_API::esi_url( wp_create_nonce_esi, Create nonce for page loader, [], no-cache, true ) $buffer = str_replace($original_nonce, $esi_url, $buffer) return $buffer if ( method_exists(LiteSpeed_Cache_API, esi_url) ) ob_start( html_nonce_replacement ) Expand Thank you for code. I have add this code to my functions.php and turn on esi, but now, loading button is not working: http://prntscr.com/q6mxk7 It just keep loading @boka003 please turn LiteSpeed Cache > Settings > ESI > Enable ESI [ON] then clear all cache and try again. Now it not allow me to turn it on. If i do, i get this message http://prntscr.com/q6n5bj EDIT: I get it on, somehow: http://prntscr.com/q6n7s4 But still situation is same. Can you try to comment out the functions.php code Ive sent and turn ESI ON again? I have remove code and turn ESI on, but still no changes After the ESI turned ON, please try to put back: LiteSpeed_Cache_API::hook_tpl_esi(wp_create_nonce_esi, nonce_esi ) function nonce_esi() echo wp_create_nonce() exit function html_nonce_replacement($buffer) if ( ! isset( $_GET[ lsesi ] ) && ! is_admin() ) $ajaxNonce_position = strpos($buffer, ajaxNonce) + 12 $original_nonce = substr($buffer, $ajaxNonce_position, 10) $esi_url = LiteSpeed_Cache_API::esi_url( wp_create_nonce_esi, Create nonce for page loader, [], no-cache, true ) $buffer = str_replace($original_nonce, $esi_url, $buffer) return $buffer if ( method_exists(LiteSpeed_Cache_API, esi_url) ) ob_start( html_nonce_replacement ) Expand If its still not working, please please join our Slack channel for helping us to reproduce the issue, thanks. Thank you, i have join ti chanel



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference