title: Internet Explorer FORCES a 304 when ajaxing a login status check
body: <p>I've got an IE-specific ajax login status request problem occurring in a demo site I'm creating for my company.</p>
  
  <p>In every internet explorer browser (7-9), this problem occurs, while it works like a champ in ALL others:</p>
  
  <p>after succsesfully logging in, the user is redirected to a landing page which fires off a login status request.</p>
  
  <p>If this login-status request comes back with anything but a "1", the page is redirected back to the login page.</p>
  
  <p>If you follow the traffic in Developer Tools, you see that the request for that particular status check results in a 304 Not modified (should NEVER happen), and the body of the request appears EMPTY. (It always returns a 0 or 1)... </p>
  
  <p>A HARD refresh (CTRL-F5) of the page with that check in it, STILL results in a 304 from the browser.</p>
  
  <p>Tracking those 304's with fiddler indicates that there isn't even a request over the network for that login-status URL, the BROWSER ITSELF is assuming the 304, and failing to send the request. </p>
  
  <p>when visiting the url directly, the response IS ALWAYS a 200 with the appropriate 0 or 1 expected, but when ajax'ed, it more often than not is a 304 and never sends over the network even to confirm the 304 from the server.</p>
  
  <p>Clearing browser history seems to have no effect on whether it changes the 304 to a 200.</p>
  
  <p>doubly weird is that every 10 or so tries, this actually DOES work and the request comes back 200 with a real response, but more often than not it comes back 304 with no response, and the value does not equate to 1 with the cached value (not even sure what it equates to?!)</p>
  
  <p>I have altered the response to this request to have the following headers generated by php:</p>
  
  <pre><code>header('Cache-Control: no-cache');
  header('Pragma: no-cache');
  header('Expires: -1');
  </code></pre>
  
  <p>When visiting the URL directly in IE, those headers are present, when the 304 occurs, they are not. </p>
  
  <p>It's as if IE is actively ignoring that particular request...</p>
  
  <p>Any ideas?</p>
  
  <p>Again, this works in EVERY other browser, literally, but IE of various flavors.</p>