How do I set expiration on CSS, JS and Images?

This is the one I use to fix the exact same thing when I ran the PageSpeed Addon:

<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
    Header set Cache-Control "max-age=604800, public"
</FilesMatch>

This goes into your .htaccess file.

Read up on this page for more information about how to set cache for additional file types and/or change the cache length:

http://www.askapache.com/htaccess/apache-speed-cache-control.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)