title: redirect iOS webApp user to Safari?
body: <p>I am working on a website. </p>
  
  <p>iPhone users have the ability to "Save To HomeScreen" my website. Doing this will place an icon in the iPhone's home screen so that the user can access my website as a WebApp (full screen mode, Safari view).</p>
  
  <p>I am trying to redirect webApp users to normal Safari. I dont want users to view my website in webApp mode.  </p>
  
  <p>This is the code:</p>
  
  <pre><code>window.onload=function(){
      if (navigator.standalone) {
          console.log ('Running iOS webApp, lets send user to Safari');
          window.location.href = "http://www.urlToWebsite.com";
      } else {
          console.log ('Running in a normal browser');
      }
  };
  </code></pre>
  
  <p>From what everyone posts online, links opened in iOS webApp "mode" redirect to Safari. </p>
  
  <p>However, in this case, where I am 'clicking' the link using javascript, the redirect to Safari doesnt happen. Instead, the webApp reloads in place.</p>
  
  <p>How can I redirect to Safari successfully?</p>