title: launch an app or redirect to a web page using QR code
body: <p>After making some research, I now know that I can launch an iphone app by scanning a QR code.</p>
  
  <p>Instead of generating the QR code for the app's custom url, I want to have dedicated html page where it will decide weather to lunch the app if it existes or to redirect to another url like itunes download page etc. but now from Javascript how we can make this decision?</p>
  
  <p>And the whole thing should happen automatically not on click like the solution given on <a href="https://stackoverflow.com/questions/1108693/is-it-possible-to-register-a-httpdomain-based-url-scheme-for-iphone-apps-like/1109200#1109200">this link</a>.</p>
  
  <p>I once seen the same exact solution I am looking for when I scan a QR code on VEVO youtube page.</p>