oalders / http-browserdetect

Determine the Web browser, version, and platform from an HTTP user agent string
http://www.browserdetect.org
Other
57 stars 50 forks source link

Request: Touch identification #132

Open knider opened 7 years ago

knider commented 7 years ago

Can we have a method that detects whether the browser supports Touch or not? I'd like to be able to identify smaller devices such as Microsoft's surface that can be used like a tablet but are not identified as a tablet.

oalders commented 7 years ago

How would you propose we detect this from the useragent string?

andrewmoise commented 7 years ago

What about just detecting the Surface as a tablet?

oalders commented 7 years ago

@andrewmoise that sounds good to me.

knider commented 7 years ago

I don't think the surface is truly defined as a tablet. Use this: ENV{HTTP_USER_AGENT} =~ m/Touch/