title: Why there is an extra object after redirect to the new URL with windows.location
body: <p>I built a server with Python+Flask, and used 3rd party javascript SDK in my page, and this page will be open by WeChat. Here is the code snippet :</p>
  
  <pre><code>   document.querySelector('#scanQRCode1').onclick = function () {
         wx.scanQRCode({
           needResult: 1,
           desc: 'scanQRCode desc',
           success: function (res) {
          var newurl = "{{ url_for('ReturnStep1') }}" + "/" + res.resultStr;
          window.location.replace(newurl);
           }
         });
  </code></pre>
  
  <p>When openning the page on Android, it could redirect to the new page correctly. But it refreshes the window with the content of res.resultStr immediately. </p>
  
  <p>When running the same code on iphone, it is correct. </p>
  
  <p>Does anyone have any ideas? Thanks</p>