How do you recognize a mobile device in JavaScript?
You can determine type of the device only if a mobile device requests mobile site. In default, they all do, but it's not guaranteed. But it's OK, you should server page and styles and features as requested.