static files not caching with correct headers

Is there a reason why the static files are being requested again when they should already be cached for 7 days on the local machine? The 2nd hit to the page should get this static file from the local machine without requesting it from the server and receiving a 304 code response.

1st view Request #13:

2nd view Request #3:

Let me know if my understanding is correct or not.


A vary header on images will prevent IE from caching them -

Otherwise you understanding would have been correct. Just send vary headers for text content that would otherwise be gzipped and it should start working.

Would you recommend stripping out the “Vary” http header?
Why would apache application send that “Vary” http header OTTB?


Apache wouldn’t normally send the vary header unless it was actually gzipping the content so it’s worth going through your configs to make sure the mime types for gzip are set up correctly and that you aren’t using mod_headers to force the Vary header.

Thanks. I’ll look into this so that some of the static files are being cached properly.