title: javascript: Checking if user agent is on desktop device
body: <p>I'm looking all over the web and still can't find a pretty decent way to check if a browser is used on a desktop computer or on tablet/mobile. </p>
  
  <p>Consider the next issue, there are touch devices which are desktop (desktop surface).
  Eventually what im trying to achieve is to separate between the next two:
  1. Touch devices that have orientation switching enabled
  2. Touch devices that are actually desktop ones</p>
  
  <p><strong>Is there any recommended way to check this?</strong></p>
  
  <p>Also, I tried the next 3rd party WURFL.io but i found 2 issues with that:
  It gives you a too-simple result (which encapsulates all the decisions inside) and it basically not working well when emulating a mobile device on chrome.</p>