3

I'm trying to understand some browser caching behavior in IE. I have a test page that includes some css and do the following:

Edit: I wasn't clear, I have a test.html file that has a link to a test.css file. The test.html file gets re-sent everytime, only the test.css file is cached.

IE9 :

  1. Go to page to get current files
  2. css file comes back with a Last-Modified header for 19:58
  3. change css file
  4. click on the url bar and hit enter
  5. get a 304 not modified for the css file

The following headers are sent in the request:

Request GET /test.css HTTP/1.1
Accept text/css
Referer http://10.0.0.60/test.html
Accept-Language en-US
User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Accept-Encoding gzip, deflate
Host 10.0.0.60

The Last-Modified header in the response is 19:58 (same as before the file was modified)

Clicking a link, either to the same page or to another page that uses the same css file does the same thing.

Ctrl+R sends an If-Modified-Since header and gets the updated file.

So my question is, what is deciding that the browser should use the cached version? If there is no If-Modified-Since header, why is the server returning a 304?

Server is IIS 7

carpat
  • 861
  • 10
  • 25

0 Answers0