Stu Cox explains that there are a ton of ways you might think you can get a yes-or-no answer on whether a browser supports touch or not:
- Width media queries
- Touch-related DOM events
- Touch-related APIs
- Pointer media queries
The normal refrain around this is “there are devices that are both, so you’d be wrong on those,” which is true, but it’s actually more problematic than that. These testing methods are often just straight up wrong.
… Read article “You Can’t Detect A Touchscreen”