I've been working on optimizing my site to make it load quicker.
On the speed test sites, it always tells me that I need to Specify a cache validator. Which I have, but it lists out all of the images in the ajax-images and the alert-images file that our scripts / templates use. I can't figure out why those images / folders are not "specifying a cache validator" when I've worked hard (I thought) to ensure my site have the last-modified and ETags.
Any suggestions? Thanks!!
EDIT: Thought this would help. Here's part of my .htaccess file that deals with this:
FileETag MTime Size
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 week"
# cache.appcache needs re-requests in FF 3.6 (HTML5)
ExpiresByType text/cache-manifest "access plus 5 minutes"
# Your document html
ExpiresByType text/html "access plus 5 minutes"
ExpiresByType text/php "access plus 5 minutes"
ExpiresByType text/text "access plus 5 minutes"
ExpiresByType text/txt "access plus 5 minutes"
# Data
ExpiresByType text/xml "access plus 30 minutes"
ExpiresByType application/xml "access plus 30 minutes"
ExpiresByType application/json "access plus 30 minutes"
# RSS feed
ExpiresByType application/rss+xml "access plus 30 minutes"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 month"
# Media: images, video, audio
ExpiresByType image/gif "access plus 5 minute"
ExpiresByType image/png "access plus 5 minute"
ExpiresByType image/jpg "access plus 5 minute"
ExpiresByType image/jpeg "access plus 5 minute"
ExpiresByType video/ogg "access plus 60 minute"
ExpiresByType audio/ogg "access plus 60 minute"
ExpiresByType video/mp4 "access plus 60 minute"
ExpiresByType video/webm "access plus 60 minute"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType font/truetype "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
</IfModule>
<IfModule mod_headers.c>
Header set Connection keep-alive
<FilesMatch "\\.(ico|css|js|sfw)$">
Header set Cache-Control "max-age=13145000, pubic, must-revalidate"
Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
</FilesMatch>
<FilesMatch "\\.(gif)$">
Header set Cache-Control "max-age=300, pubic, must-revalidate"
Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
</FilesMatch>
<FilesMatch "\\.(jpe?g|png|)$">
Header set Cache-Control "max-age=300, pubic, must-revalidate"
Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
</FilesMatch>
<FilesMatch "\\.(x?html?|php)$">
Header set Cache-Control "max-age=60, pubic, must-revalidate"
Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
</FilesMatch>
</IfModule>