• Hi,

    I use wptouch and wp_supercache together.

    I have found an issue with Android tablets (User-Agent “Android” without mobile)

    wptouch doest not consider Android tables as mobile device. This is correct. Tablets should use my desktop version.

    But WP Super Cache does consider all Android devices as mobile devices, including tables, which do not have the “mobile” tag in their user-agent.
    In the $wp_cache_mobile_browsers is only “Android”.

    If the first “mobile access” comes from a tablet, wptouch will send the desktop version, and supercache will cache the desktop versions as “mobile”. Further accesses from real mobile devices will get that cached desktop version.

    Set Android to the forbidden UA´s is not a solution, because “Android Mobile UA” and “Android” cant create a cachfile but when a other mobile cache file exists, it will show the mobile version. In that way android tablets will get a mobile version.

    It would be great when there is a second check. If Android, check for “mobile” also. Something like this:

    if(stripos($_SERVER[‘HTTP_USER_AGENT’],”Android”) && stripos($_SERVER[‘HTTP_USER_AGENT’],”mobile”)){
    $Android = true;
    }else if(stripos($_SERVER[‘HTTP_USER_AGENT’],”Android”)){
    $Android = false;
    $AndroidTablet = true;
    }else{
    $Android = false;
    $AndroidTablet = false;
    }

    But I dont know where I have to add this. I tried it many days with some brothers and smartphones.

    Its important for me to get this working, because I have 70% mobile users. Thank you

    https://wordpress.org/plugins/wp-super-cache/

  • The topic ‘Android Tablet as mobile device?’ is closed to new replies.