How to test for touchscreen (not "touch capability")? How to test for touchscreen (not "touch capability")? google-chrome google-chrome

How to test for touchscreen (not "touch capability")?


A simple user test of "Click or Tap this Box" should be able to tell you if they used a mouse or some touch device to complete the action. Since you can get the user-agent of devices, for tablets and phones its easy to assume with the two data's that they are touch capable... so you could only present the "test" if you detect a desktop user that also tested positive for a touch device (should be a smaller sample than testing everyone, which could get annoying to users). Of course I'd also somehow remember the user choice/test result so you don't have to bug them again.