• Resolved systemaddict

    (@systemaddict)


    Hi

    We would like to differentiate, not only between desktop and mobile, but between desktop, mobile, tablet.

    Is that possible with this plugin somehow?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Thread Starter systemaddict

    (@systemaddict)

    Thanks!

    So the settings page in the plugin is basically just a frontend for htaccess changes?

    I’m 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 isn’t cover all the tablet, the best way to detect tablet device is using CSS and JS.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to get “Cache tablet”’ is closed to new replies.