2010/08/02

Setting http expires in .htaccess

YSlow gave me an "E" on one of my websites so I started tweaking things a little. One of the things that made a big difference was setting http expiration headers.

In my .htaccess I added...
ExpiresActive On
ExpiresByType text/javascript A604800
ExpiresByType text/css A604800
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresActive On
ExpiresDefault "access plus 30 days"

0 件のコメント: