title: How to check app is installed or not using javascript
body: <p>I am using javascript to check if app is installed or not, if my app installed i want to open my app or else it will redirect to play store account. the issue is that it is redirecting to play store even i already have app installed</p>
  
  <p>This is my .html file where i am checking for app</p>
  
  <pre><code> &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;body&gt;
          &lt;script type="text/javascript"&gt;
              window.onload = function() {
                  // Deep link to your app goes here
                  document.getElementById("l").src = "intent://sdf/SplashScreen#Intent;scheme=vsd;package=com.sdf.android.ff;end";
  
                  setTimeout(function() {
                      // Link to the App Store should go here -- only fires if deep link fails                
                      window.location = "https://play.google.com/store/apps/details?id=com.sdf.android.dffd";
                  }, 500);
              };
          &lt;/script&gt;
          &lt;iframe id="l" width="1" height="1" style="visibility:hidden"&gt;&lt;/iframe&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>