Cache expiration with apache for beginners
I'm a beginner when it comes to caching. I'm trying to set up caching for
files in my apache based website. I am unfamiliar with htaccess and
httpd.conf
Firstly I have added
<meta http-equiv="Cache-Control: max-age=259200" content="public" >
to the head of the html. This has not worked, I am using Yslow and google
chrome audit, both say that I'm 'missing a cache expiration' or need to
add 'Expires headers'.
I've added
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType image/x-icon "access 1 year"
</IfModule>
to the htaccess file, and
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule expires_module modules/mod_expires.so
are unchecked in the httpd.conf.
This is about as far as I have got as my googling seem to all say to take
these measures - but I get no response from any of it. Any help or further
tips on what I'm doing wrong would be very kind
No comments:
Post a Comment