Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Need help: cache and .htaccess
02-15-2012, 01:06 AM #1
- Join Date
- Feb 2012
- Thanked 0 Times in 0 Posts
Need help: cache and .htaccess
Hello. I don't know if this belongs here, but I didn't find anywhere else to put this, and I'd like to get help with this.
In my website, I want the images to be on the cache for 2 weeks, and the .js and .css files for 3 days. I put this code in my .htaccess
<FilesMatch "\.(jpg|jpeg|png|gif|swf|ico)$"> SetOutputFilter DEFLATE ExpiresActive on ExpiresDefault A1209600 Header set Cache-Control "max-age=1209600" </FilesMatch> <FilesMatch "\.(css|js)$"> SetOutputFilter DEFLATE ExpiresActive on ExpiresDefault A259200 Header set Cache-Control "max-age=259200" </FilesMatch>