WebPagetest Forums
static files not caching with correct headers - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: static files not caching with correct headers (/showthread.php?tid=11469)



static files not caching with correct headers - trx - 07-25-2012 12:41 AM

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


RE: static files not caching with correct headers - pmeenan - 07-25-2012 12:49 AM

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.


RE: static files not caching with correct headers - trx - 07-25-2012 03:30 PM

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

Thanks.


RE: static files not caching with correct headers - pmeenan - 07-26-2012 03:13 AM

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.


RE: static files not caching with correct headers - trx - 08-01-2012 05:01 AM

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