title: Detecting installed apps on iPhone with javascript or url
body: <p>I am building a HTML5 based mobile web app for iPhone. I need to check whether user has specific application that I suggest. I heard that each iPhone application has unique URL scheme to detect their app indentity.</p>
  
  <p>Therefore, I've read this article to get an idea.</p>
  
  <p><a href="https://stackoverflow.com/questions/1108693/is-it-possible-to-register-a-httpdomain-based-url-scheme-for-iphone-apps-like/1109200#1109200">Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?</a></p>
  
  <p>However, this is not perfect answer to make what I am trying to make.</p>
  
  <p>here is what might happen</p>
  
  <ol>
  <li>User clicks a recommendation app on mobile web browser.</li>
  <li>Check with application iTunes URL and URL scheme.</li>
  <li><p>If the user has the installed application, it returns 'installed'
  ==> In this case, the screen returns back to mobile browser.</p></li>
  <li><p>If the user does not have the installed application, it returns 'uninstalled'
  ==> In this case, the screen moves to App Store.</p></li>
  </ol>
  
  <p>I am running mobile web app with PHP language.</p>
  
  <p>Thank you.</p>