Wordpress LScache Plugin: How to get Cache tablet
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi We would like to differentiate, not only between desktop and mobile, but between desktop, mobile, tablet. Is that possible with this plugin somehow? Hi @systemaddict, you can create vary for specific user agent on .htaccess HTTP_USER_AGENT row like below: ### marker TABLET start ### RewriteCond % HTTP_USER_AGENT Mobile|Android|Silk/|Kindle|BlackBerry|Opera Mini|Opera Mobi [NC] RewriteRule . - [E=Cache-Control:vary=istablet] ### marker TABLET end ### But the problem is most of the devices usually use a similar user agent on mobile and tablet device, so the better way to show different layout on screen is to use screen size detection by CSS and JS. Thanks! So the settings page in the plugin is basically just a frontend for htaccess changes? Im asking because if I make the tablet entry in htaccess, I guess it would be deleted if someone saved the settings page? .htaccess is a server-side setting which will add a vary for our caching engine to create a separate cache on every request on your site. By the way the above .htaccess is just a sample, please try to use: ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle on RewriteCond % HTTP_USER_AGENT But again, this rewrite condition isnt cover all the tablet, the best way to detect tablet device is using CSS and JS.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference