Log in

View Full Version : Mouse or Touchscreen



vincentMeens
03-02-2009, 03:40 PM
Hello experts,

I was wondering if there is a way to detect if the client uses a mouse or a touchscreen device of some sort to navigate your website. This is because some of the interaction on my website relies on mouse position without being clicked. So if I could detect this I could offer an alternative. The detection can be either server-side or client-side.
When I searched the web for this, I only found methods of parsing the userAgent string for known mobile web browsers, but that isn't really sufficient, since some mobile devices still offer a mouse or have undistinguishable userAgent strings from regular computer web browsers.

Thanks in advance,
Vince

Medyman
03-02-2009, 05:37 PM
http://www.hand-interactive.com/resources/detect-mobile-php.htm#handsetdetection