title: Detect between a mobile browser or a PhoneGap application
body: <p>Is it possible to detect if the user is accessing through the browser or application using JavaScript? </p>
  
  <p>I'm developing a hybrid application to several mobile OS through a web page and a PhoneGap application and the goal would be to:</p>
  
  <ol>
  <li>Use the same code independently of the deployment target</li>
  <li>Add PhoneGap.js file only when the user agent is an application</li>
  </ol>