none
Caching does not seem to work with only Cache-Control header RRS feed

  • Question

  • I have a server that sends data that always expires at midnight of the same day it was requested.

    Cache-Control: max-age=30187

    However, sending a GET request to the server one minute after midnight still fetches the result from the cache instead of issuing a new request to the server. The server does not send an ETag response header. Might that be the problem and confuse the IE caching?

    I am using XHR to perform the requests. Clearing the IE cache manually fetches the page after midnight (naturally).


    • Edited by pkursawe Tuesday, December 16, 2014 12:01 PM
    Tuesday, December 16, 2014 11:57 AM

All replies

  • The Cache-Control header you're showing here says: This item is good for the next 8.38 hours; that item is eligible to be pulled from the cache for that amount of time, regardless of what the date is.

    After that time passes, IE will either make a conditional validation request (to which the server can respond with a 304, indicating that the content is unchanged, or a 200 and new content) or an unconditional validation request (to which the server must respond with a 200 and the newest content.

    You should use Fiddler to watch exactly what happens on the subsequent request.

    You should also state which exact version of IE you're using. IE8 had a number of bugs (e.g. every other Cache-Control directive is ignored).

    Tuesday, December 16, 2014 3:01 PM
  • I try to reproduce that with a simple nodejs server on my side here. The IE version is 11, from Windows 8.1. This behaviour is from a Windows 8 Store app written in HTML/JS.
    Friday, December 19, 2014 8:55 AM