I don't like the current state of 'mobile device' detection.
Most of the methods I looked at are apt to fail over time.
The W3C or WHATWG really need to do some work on this.
My current method doesn't use user_agent — because the standards committees say it's wrong to do it that way. I'm currently using the CSS3 selector:
screen and (min-width: 1080px)
This is a simple approach that will work until phone displays have 4K screens.
(Oh no! They already do!)
I'll be hacking for quite a while on a future proof approach ...
The issue is the relative size of the fonts in comparison to the screen, a font size in points is supposed to be a measure in inches (1pt=1/72 inch) but they are not even close to that size on a mobile device. This is on purpose, because of the screen size.
So a reasonable approach would be to measure the size of a word against some heuristic standard to determine if the font is too small. It's not mobile detection we are really after, but point size v.s. screen size.
I don't want to have separate sites for mobile and PC.
(One site to rule them all.)