title: iOS/Android Detect and Redirect
body: <p>Newbie in js so take me slow:D
  Need to make a redirection based on what os the user is using. If ios redirect to x, if android redirect to y, else..stay on the original address. 
  My question:</p>
  
  <p>Are these snippets enough?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt; // &lt;![CDATA[
      if ( (navigator.userAgent.indexOf('Android') != -1) ) {
          document.location = "y";
      } // ]]&gt;
  &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt; // &lt;![CDATA[
      if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) {
          document.location = "x";
      } // ]]&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Thank you!:D</p>