<IfModule mod_headers.c><FilesMatch ".(gif|jpg|jpeg|png|ico)$">Header set Cache-Control "max-age=604800"</FilesMatch>上面的代码设置了网站的图片使用为期一周的HTTP缓存,当然,你一样可以给js或者css文件加上http缓存哦。
<IfModule mod_headers.c><FilesMatch ".(gif|jpg|jpeg|png|ico)$">Header set Cache-Control "max-age=604800"</FilesMatch>
<IfModule mod_headers.c>
<FilesMatch ".(gif|jpg|jpeg|png|ico)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>