detectmobilebrowsers.com provides this line for mobile detection on nginx:
if ($http_user_agent ~* "(android|bb\d+|meego).+mobile| ...
To enable tablet detection, they provide this line:
|android|ipad|playbook|silk
How can I detect phone or tablet, like at a finer grain? The issue is droid phone has a user agent string like "Android ... Mobile" and tablet just has "Android".
I looked at nginx if statements. There's no and operator, and nested if's lack documentation. I saw the NOT OR regex, and working on a solution using that: