I added following code in .htaccess file of my php project.
<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 application/pdf "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
But still google analyzer is not marking it as resolved. it is showing (expiration not specified) for every image,css and js.
Do I need to do something else to make it work?
2
Answers
Your configuration seem good.
mod_expires is enable in your apache configuration ?
can you provide the result of :
EDIT :
I add a non exhaustive list
compress-php-css-js-javascript-optimize-website-performance
Just replace “/the/full/path/of/this/file” path to your correct directory by using this php code
dirname(__FILE__)