title: jQuery $. GetJSON and window. Location conflict issue
body: <p>I'm having an odd situation where a jQuery <code>$.getJSON</code> / <code>$.ajax call</code> is being interrupted by a plain JavaScript <code>window.location = 'http://new.com/'</code> event.</p>
  
  <ol>
  <li><p>Fire event</p>
  
  <pre><code>window.location = 'http://example.com/something-that-takes-a-couple-seconds';
  </code></pre></li>
  <li>While the above URL is connecting, but before the browser actually redraws anything, make a <code>$.getJSON</code> call. In my case, I happen to trigger this by scrolling to the bottom of the page (loads more results).</li>
  <li>Instead of actually going to <code>http://example.com/something-that-takes-a-couple-seconds</code>, instead connect to the JSON URL <code>http://example.com/ajax/getJSONList.php?params=...</code> and see the plain text JSON result set.</li>
  </ol>
  
  <p>Anyone have this problem before?</p>
  
  <p>I suppose a simple enough solution is just to block all further javascript execution by any means necessary right after I fire the <code>window.location</code> change?</p>
  
  <p>EDIT: You can see the code in action here: <a href="http://myscubadives.com/" rel="nofollow">http://myscubadives.com/</a>, but it won't be especially fun to wade through.</p>
  
  <p>To reproduce: First, use the Facebook login button in the top right. Sign in to Facebook, and allow my site access. Once the Facebook bit connects, the following line runs: location.replace('/user/facebook'); - I've tried location.replace(), location.href, window.location. Same issue on all.</p>
  
  <p>Now, while '/user/facebook' is connecting, scroll to the bottom of the page very quickly. This will fire the getJSON call. Instead of hitting '/user/facebook', you will be presented with RAW JSON.</p>
  
  <p>I'll try to make an example page with all the other stuff stripped out ASAP, if no one can help me this way.</p>