Receive 304 if not If-Modified-Since sent?

I am trying to understand the browser caching behavior in IE. I have a test page that contains some css and does the following:

Edit: I didn't get it, I have a test.html file that has a link to the test.css file. The test.html file is uploaded every time, only the test.css file is cached.

IE9:

  • Go to the page to get the current files.
  • The css file is returned with the last changed header for 19:58
  • modify css file
  • click on the url line and press enter.
  • get 304 unchanged for 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 on a link, either on the same page or on a different page using the same css file, does the same thing.

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

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

IIS 7 Server

+3


source to share





All Articles