Okay, I'm still trying to get some of the caching, and I looked through some examples that I could find on Google. I added the following code to the .htaccess file:
### activate mod_expires ExpiresActive On ### Expire .gif 1 month from when they're accessed ExpiresByType image/gif "access plus 3 months" ExpiresByType image/png "access plus 3 months" ExpiresByType image/jpg "access plus 3 months" ExpiresByType text/javascript "access plus 3 months"
Using the Chrome audit tools and the YSlow Firebug tool, it looks like it's caching some of my images / files, but not all of them. I still have a list of files (.jpg, .js and .css - I know that I did not install cache files here) that are not cached. The Chrome revision message simply states The following resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers: The following resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers:
some of the images that are not caching are background images, others are part of the js gallery and called via JS - can this affect why they are not cached?
Sorry, I canโt give a link to the code - sites that are still under covers and are limited only by the presentation of the client.
Thanks in advance!
apache .htaccess cache-control
TH1981
source share