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:

http://www.webpagetest.org/result/120724_K2_7c53cdd711cdf6557bbd528b5677b736/1/details/

2nd view Request #3:

http://www.webpagetest.org/result/120724_K2_7c53cdd711cdf6557bbd528b5677b736/1/details/cached/

Let me know if my understanding is correct or not.

Regards,
TRX

A vary header on images will prevent IE from caching them - http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx

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?

Thanks.

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.