Is there a way to Disable LiteSpeed Cache for a specific user agent?




Wordpress LScache Plugin: Is there a way to Disable LiteSpeed Cache for a specific user agent?

Last Updated on: Wed, 15 Apr 2026 00:00:02
is there a way to disable all LiteSpeed optimizations for a specific user agent? LiteSpeed and Instagrams in app browser is not working nice together. Everything works fine as long as I disable LiteSpeed Cache, But once LiteSpeed activated Mobile menu navigation stops working, the slider revolution stops working, strange spaces are created between elements. This is specific to Instagrams in app browser, regular mobile browsers work fine, web browsers as well. There was a similar post in dealing with this issue https://wordpress.org/support/topic/exclude-user-agent-from-all-optimizations/ And that with and the help of Lars (From LiteSpeed) This is the code I ended up using while they dig into the issue (top of wp-config.php) // Added by me - if (stripos($_SERVER[HTTP_USER_AGENT], Instagram )!==false ) define( LITESPEED_DISABLE_ALL, true ) // END



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



Reference