I have been all over the internet trying to figure out how to make this work. When mod_pagespeed is working and I make a change to css it does not update unless I turn it off or clear the cache.
Maybe I'm doing something wrong but I cannot figure out what. I have this in my pagespeed config.
ModPagespeedForceCaching on
# These caching headers are set up for the mod_pagespeed example, and
# also serve as a demonstration of good values to set for the entire
# site, if it is to be optimized by mod_pagespeed.
<Directory /var/www/mod_pagespeed_example>
# To enable to show that mod_pagespeed to rewrites web pages, we must
# turn off Etags for HTML files and eliminate caching altogether.
# mod_pagespeed should rewrite HTML files each time they are served.
# The first time mod_pagespeed sees an HTML file, it may not optimize
# it fully. It will optimize better after the second view. Caching
# defeats this behavior.
<FilesMatch "\.(html|htm|css)$">
Header unset Etag
Header set Cache-control "max-age=0, no-cache"
</FilesMatch>
# Images, styles, and JavaScript are all cache-extended for
# a year by rewriting URLs to include a content hash. mod_pagespeed
# can only do this if the resources are cacheable in the first place.
# The origin caching policy, set here to 10 minutes, dictates how
# frequently mod_pagespeed must re-read the content files and recompute
# the content-hash. As long as the content doesn't actually change,
# the content-hash will remain the same, and the resources stored
# in browser caches will stay relevant.
<FilesMatch "\.(jpg|jpeg|gif|png|js)$">
Header unset Etag
Header set Cache-control "public, max-age=600"
</FilesMatch>
</Directory>
This is in my httpd.conf
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType text/css "access plus 60 seconds"
ExpiresByType image/gif "access plus 2 weeks"
ExpiresByType image/jpeg "access plus 2 weeks"
ExpiresByType image/x-icon "access plus 2 weeks"
ExpiresByType text/javascript "access plus 2 days"
ExpiresByType image/ico "access plus 2 weeks"
ExpiresByType image/png "access plus 2 weeks"
ExpiresByType image/jpeg "access plus 2 weeks"
ExpiresByType application/javascript "access plus 2 days"
</IfModule>
What am I doing wrong? Why is my CSS not updating every 10 mins like it's suppose too?