title: Redirect mobile users to app download once
body: <p>So most of the time as I am browsing the net if I go to a website that has an app it first takes me to a landing page that says bla bla the site is better on the app download it here or "no thanks". Then after you do that it no longer asks you that question. what is the easiest way to implement this kind of action? Using javascript I can find if a person is on android</p>
  
  <pre><code>var ua = navigator.userAgent.toLowerCase();
  var isAndroid = ua.indexOf("android") &gt; -1; //&amp;&amp; ua.indexOf("mobile");
  if(isAndroid) {
      // Do something!
      // Redirect to Android-site?
      window.location = 'http://android.davidwalsh.name';
  }
  </code></pre>
  
  <p>However how do I make this only happen one time? which page would I add it to? Any ideas? I was thinking cookie but I am not sure if mobile browsers let you add cookies the same way.</p>