title: redirect in javascript not working on iPhone
body: <p>I'm trying to force a redirect in javascript to another website of mine, this works but not on iPhone for some reason. It seems to fail when using the data variable in the success method of my ajax. But when I put a string it works.</p>
  
  <p>I have tried:</p>
  
  <pre><code>$("button").click(function(){
      $.ajax({
          url: "testpage.php", 
          success: function(data){
               console.log(data);//This prints in the console http://www.google.com
               window.location = data;
          }
      });
  });
  </code></pre>
  
  <p>This works on my laptop, and on my Samsung S6, but on iPhone is simply refreshes the page.</p>
  
  <p>If I do this it works:</p>
  
  <pre><code>window.location = 'http://www.google.com';
  </code></pre>
  
  <p>I have tried numerous ways to get this to work on iphone and all fail:</p>
  
  <pre><code>window.location.href = data;
  location.href = data;
  document.location = data;
  </code></pre>
  
  <p>I have even tried to dynamically create an  and then automatically click it using jQuery. All of these work, but not on iPhone!</p>
  
  <p>Can anyone suggest anything?</p>