0

I am using a separate theme for mobile devices but I still want to present the desktop theme for Android tablets.

here's my matched expressions for the exception

iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini

and in iPad it shows the desktop theme as it should but on Android tablets i'm still getting the mobile theme.

0

I saw that the user agent string for Android Tablets contained "Safari" whereas the string for Android cell phones has "Mobile Safari" so I just targeted "Mobile Safari" for my mobile theme and now all tablets get the desktop theme.

Here's my final string to target only mobile devices, not tablets

iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|mobi|Windows Mobile|Safari Mobile|Mobile Safari|Opera Mini

Notice that I removed "Android" from that string.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.