title: jQuery PHP session_destroy
body: <p>I am trying to call a php script which destroys session and reload a page after it.</p>
  
  <pre><code>$(document).bind("active.idleTimer", function(){
    $.post("data.php?data=active");
    location.reload();
  });
  </code></pre>
  
  <p>data.php</p>
  
  <pre><code>if($_GET['data'] == 'active') {
    session_destroy();
  }
  </code></pre>
  
  <p>It does not destroy the session, only if I manually open the url data.php?data=active it does, why is that? Thanks!</p>