title: ajax-based login fails: IE6 and IE7 ajax calls delete session data (session_id however is kept)
body: <p>This question comes after two days of testing and debugging, right after the shock I had seeing that none of the websites i build using ajax-based login work in IE&lt;8</p>
  
  <p>The most simplified scenario si this:</p>
  
  <p><strong>1. mypage.php :</strong></p>
  
  <pre><code>session_start();
  $_SESSION['mytest'] = 'x';
  
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;           
      &lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;     
          function loadit() {
              $.post('http://www.mysite.com/myajax.php', {action: 'test'}, function(result){alert(result);}, 'html');
          }
      &lt;/script&gt;
  
  
      &lt;a href="javascript:void(0);" onclick="loadit(); return false;"&gt;test link&lt;/a&gt;
  </code></pre>
  
  <p><strong>2. myajax.php</strong></p>
  
  <pre><code>session_start();
  print_r($_SESSION);
  print session_id();
  </code></pre>
  
  <p>When I click the "test link", the ajax call is made and the result is alert()-ed:</p>
  
  <p><strong>IE6:</strong> </p>
  
  <pre><code>weird bullet-character (&amp;bull;)
  </code></pre>
  
  <p><strong>IE7:</strong> </p>
  
  <pre><code>Array(
  )
  &lt;session_id&gt;
  </code></pre>
  
  <p><strong>IE8/FF (Expected behaviour):</strong></p>
  
  <pre><code>Array(
      [mytest] =&gt; 'x'
  )
  &lt;session_id&gt;
  </code></pre>
  
  <p>I would really appreciate some pointers regarding:
     1. why this happens
     2. how to fix it</p>
  
  <p>Thank you.</p>