I'm trying to detect if the client is using a tablet in JavaScript. I do not want to use CSS3 or UserAgents if I can. One method that came into my mind was using screen.width
property inside the browser to get the device width and detect tablets if the screen.width
is less than a certain threshold.
Do you guys think this would be a good solution?
What is the support for this property? Do most tablets support this feature?
Any feedback would be appreciated.