Detect phone/tablet/web client using javascript
问题 I am trying to detect if the end user is on a phone, a tablet or a pc I have been Googling for a while, apparently there are no easy solution. Well I guess I should not use Resolution, since nowadays some tablets have amazing resolutions. I should not rely on orientation, because windows8 laptops can just rotate like tablets. (and responsive design is just too difficult for my current project) I've been trying to use UserAgent(thought it has its drawbacks too), but can not get it working,