I specified ExpireByType in .htaccess but I am still getting warnings.

  • Answered
Hi All I am in the process of doing SEO for my Joomla site, and I ran the site through gtmetrix.com and I got the messages about some cs and js can benefit from having an expiration date. The confusing part is that I have explicitly added these directives in the .htaccess file and I know for sure I have more cs and js files than what gtmetrix singled out as the ones that need expiration date. The portion of .htaccess pertaining to this task is listed below. Any suggestion on what I have done wrong? Or how to interpret the "suggestions" from gtmetrix? Thank you for your help! regards, SH ## EXPIRES CACHING ## ExpiresActive On ExpiresByType image/jpg "access plus 1 week" ExpiresByType image/jpeg "access plus 1 week" ExpiresByType image/gif "access plus 1 week" ExpiresByType image/png "access plus 1 week" ExpiresByType image/svg "access plus 1 week" ExpiresByType text/css "access plus 1 week" ExpiresByType application/pdf "access plus 1 week" ExpiresByType text/x-javascript "access plus 1 week" ExpiresByType text/js "access plus 1 week" ExpiresByType application/x-shockwave-flash "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/ico "access plus 1 year" ExpiresDefault "access plus 2 days" ## EXPIRES CACHING ## ## FAR FUTURE EXPIRATION BY HEADER ## ## ADDED on 12/22/2014 IN RESPONSE TO YSlow ## plg_expiresheaders is used in Joomla, but that plugin does not affect static file types ## Header set Expires "Wed, 15 Apr 2020 20:00:00 GMT" Header set Cache-Control "public" ## FAR FUTURE EXPIRATION ##
Hello SH, Thanks for the question. I did look at your site through GTMETRIX and there looks like some remaining issues that you still need to address. It's a tough one as Gtmetrix is recommending some things that you don't accomplish with your current code. Depending on your website, it might not be something that you can do. When you run your website through Gtmetrix, you can click on each recommendation line and it should give you the specifics for the remaining issues. These are their recommendations,so if you have any remaining questions on the issue, your best bet will be to submit a query directly to them. Apologies that I can't provide a more direct answer, but if you are following their directives accurately, and their software continues to identify a problem, then only they can provide an answer for this behavior. Regards, Arnel C.