Skip to content

How To Disable LiteSpeed Cache Optimizations for WebView, Instagram User Agent

At the time of this writing LiteSpeed Cache optimizations conflict with Android In-app browsers (WebView), Instagram. For me at least it caused multiple things to stop working for example carousels, forms, positioning of elements, interactive menus not opening etc.

Disabling the optimizations through the interface made no difference, until the issue is fixed the best available solution is to exclude android web view from being optimized by LiteSpeed Cache

You can see a short discussion about this here (Slack Chat)
https://golitespeed.slack.com/archives/C3QRCDP44/p1653557443022489

For now you can add this piece of code to your wp-config. php file (WordPress root folder) to disable LiteSpeed cache for WebView in Android lollipop and above


// Disable Litespeed optimizations for android WebView Lollipop and Above

if (stripos($_SERVER['HTTP_USER_AGENT'],"; wv")!==false ) {
define( 'LITESPEED_DISABLE_ALL', true );
}

If you want to expand on this and disable WebView for other versions of android you can check out this document from Google

Back To Top

We use cookies to provide core functionality, analyze traffic, and personalize your experience on our site. To learn more or manage your preferences, please see our Cookie Statement. tt

Close Popup
Privacy Settings saved!
Cookie Preferences

Here you can change and adjust your cookies preferences for the site.

Essential for core functionalities such as secure log-in, cart maintenance, and consistent website presentation.

Cloudflare
For perfomance reasons we use Cloudflare as a CDN network. This saves a cookie "__cfduid" to apply security settings on a per-client basis. This cookie is strictly necessary for Cloudflare's security features and cannot be turned off.

Technical Cookies
In order to use this website we use the following technically required cookies
  • wordpress_test_cookie
  • wordpress_logged_in_
  • wordpress_sec

2Checkout Payment Processor
Provides the shopping card functionality and processing for the products on the site.

Decline All
Save Custom Preferences
Accept All
Skip to content