Apache image caching, JS and CSS using deflate

I am currently caching my CSS, JS and images using deflate in my Apache configuration.

Here is my code:

 AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript 

Now when I check my header, I see:

 Host www.domain.com User-Agent Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip, deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection keep-alive If-Modified-Since Fri, 30 Sep 2011 01:05:01 GMT If-None-Match "124741af-1c4b9-4ae1136f3f9d0" Cache-Control max-age=0 

Everything looks good, Accept-Encoding is gzip, deflate what I want, but now I see that Cache-Control is max-age=0 .

Will this defeat the goal of deflate caching? Does this mean that he caches only 1 day, and the next day he will not cache it or will he have to restart it?

Note. My images rarely change, my CSS and JS change once a week.

+8
caching header apache .htaccess deflate
source share
1 answer

These are 2 independent things: mod_deflate and mod_expires

Here are some articles you find interesting:

http://developer.yahoo.com/performance/rules.html

LiveHttpHeaders: what cache management information is correct

+13
source share

All Articles