title: How to detect device type using javascript
body: <p>I am developing an web application where I need to detect the device from javascript. Could anybody tell me whats the best way to do it ? I found several solution by googling. But no one is full proof. I do not want to use server side detection like WURFL.</p>
  
  <h2>My update</h2>
  
  <p>I am detecing device by matching CSS media queries using javascript. For media query matching using polyfill by Paul Irish
  <a href="https://github.com/paulirish/matchMedia.js/">https://github.com/paulirish/matchMedia.js/</a></p>