JQuery and ajax weird behavior
<p>I have the following function that I use to check for the presence of a login cookie. If the cookie is gone, the user is taken to the public side of the site. The cookie allows the user to remain in the private portion.</p>

<p>I'm using AJAX updates on the private side and what is happening is that after the checkCookie function executes with setInterval, any updates that occur after this point wind up opening a window inside of another window; much like a frame opening inside of another frame. Any updates that occur before this function fires are fine.</p>

<p>When I comment the following code, all updates occur without any issues.</p>

<p>Why is this happening and what can I do to correct this?</p>

<pre><code>  function checkCookie(){
    $.ajax({
      type: "POST",
      url: "/index.php",
      data: "loaded=true",
      dataType: 'json',
      success: function(data){
        if(data.cookie == 0){
          window.location.href = data.href;
        }
      }
    });
  }
  window.setInterval(checkCookie, 60000);
</code></pre>
