title: Ways to differentiate between desktop user and mobile users
body: <p>My team at work is trying to develop a website for both desktop and mobile and we want certain function to only be available for mobile users .We have been brainstorming of different methods to detect mobile and desktop users and have brainstorm the following ideas</p>
  
  <pre><code>1) Check for screensize , if its less than certain size , we can safely assume 
     it is desktop
  
  2) Check user browser user agent string
  
  3) Capability testing
  </code></pre>
  
  <p>Are there any other methods to detect between Desktop and Mobile , if its possible please list the pros and cons of the method also .</p>
  
  <p>Thanks</p>