Expires Headers .htaccess

Permalink
Using Yslow I get a grade F on Add EXpires Headers, So I added the following code to .htaccess.

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Wed, 15 Apr 2020 20:00:00 GMT"
</FilesMatch>

What can i do to resolve this?

stephenlaw
 
Mnkras replied on at Permalink Best Answer Reply
Mnkras
try something like this:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
ExpiresActive On
ExpiresDefault "access plus 30 days"
FileETag none


mainly the expiresactive
stephenlaw replied on at Permalink Reply
stephenlaw
Yes that has helped, and incresed my yslow score slightly, although from Yslow I am still getting.

Grade F on Add Expires headers
There are 6 static components without a far-future expiration date.
    * (1981/11/19) http://www.mastercoachingcentre.co.uk/index.php/tools/css/themes/luminosity/typography.css
    * (1981/11/19) http://www.mastercoachingcentre.co.uk/index.php/tools/css/themes/luminosity/main.css
    * (no expires) http://www.mastercoachingcentre.co.uk/updates/051110/concrete/css/ccm.base.css?...
    * (2010/9/3) http://www.google-analytics.com/ga.js
    * (no expires) http://www.mastercoachingcentre.co.uk/updates/051110/concrete/js/jquery.js?...
    * (no expires) http://www.mastercoachingcentre.co.uk/updates/051110/concrete/js/ccm.base.js?...


& also

Grade D on Configure entity tags (ETags)
There are 3 components with misconfigured ETags
    * http://www.mastercoachingcentre.co.uk/updates/051110/concrete/css/ccm.base.css?...
    * http://www.mastercoachingcentre.co.uk/updates/051110/concrete/js/jquery.js?...
    * http://www.mastercoachingcentre.co.uk/updates/051110/concrete/js/ccm.base.js?...


Any ideas on how to improve?
Mnkras replied on at Permalink Reply
Mnkras
well, the FileETag none should fix the et tags, you can't do anything about the ga.js as its google's

also under the mod expires try adding

ExpiresByType text/javascript "access plus 2 month"
ExpiresByType text/css "access plus 2 month"
stephenlaw replied on at Permalink Reply
stephenlaw
Yep, that added nicely to it. Just the job. Thankyou.