title: Firefox not using cached copy of file after 304
body: <p>I'm seeing a behaviour in Firefox which seems to me unexpected. This is not particularly repeatable (unfortunately) but does crop up from time to time. <em>Once it starts, it is repeatable</em> on refreshing the page until a full refresh (ctrl-f5) is done. Last time, I managed to get a trace.</p>
  
  <p>Basically, FF4.0.1 is requesting a resource (from an ASP.NET MVC 3 application running under IIS7):</p>
  
  <pre><code>GET http://www.notarealdomain.com/VersionedContent/Scripts/1.0.40.5653/jquery.all.js HTTP/1.1
  Host: www.notarealdomain.com
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
  Accept: */*
  Accept-Language: en-gb,en;q=0.5
  Accept-Encoding: gzip, deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 115
  Proxy-Connection: keep-alive
  Referer: http://www.notarealdomain.com/gf
  If-Modified-Since: Sat, 01 Jan 2000 00:00:00 GMT
  </code></pre>
  
  <p>It then gets the following response from the server (via a proxy, but I can see in the IIS server logs that the request was made all the way to the server):</p>
  
  <pre><code>HTTP/1.1 304 Not Modified
  Date: Mon, 09 May 2011 14:00:47 GMT
  Cache-Control: public
  Via: 1.1 corp-proxy (NetCache NetApp/6.0.3P2D5)
  </code></pre>
  
  <p>This seems reasonable - the client makes a <em>conditional</em> request (if-modified-since), and the server responds "ok - use your copy" (304 Not Modified).</p>
  
  <p>The problem is that the client in this case then does not dish up the file - it behaves as if there was no content (ie if an image, it doesn't appear, if js it behaves as if the .js file is missing on the page, if .css then the page renders without the css styles, etc). This is apparent on both the web page itself, and also when using the excellent <a href="http://www.httpwatch.com/" rel="nofollow">HttpWatch</a> tool. HttpWatch clearly shows that the browser did have the item in cache, but didn't use it as the content source.</p>
  
  <p>What am I missing here? The above conversation seems reasonable, so why does FF make a conditional request and then not use its cached copy when told to do so? If you then ctrl-F5 to force a full refresh, the behaviour goes away, and only returns sporadically.</p>
  
  <p>We also have some anecdotal evidence that this occurs with FF3 and Chrome too, but we haven't confirmed this with any forensic data.</p>
  
  <p>Has anyone else seen this, and does anyone know what might be going wrong, or what further steps might isolate the problem?</p>