在.htaccess文件中加入如下代码: 1: # Image and Flash content Caching for One Month 2: <FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$"> 3: Header set Cache-Control "max-age=2592000" 4: </FilesMatch> 编辑完毕后保存文件。 代码中“max-age”参数的值为2592000(秒),因此图片缓存和Flash内容缓存在浏览器中保留一个月。
在.htaccess文件中加入如下代码:
编辑完毕后保存文件。 代码中“max-age”参数的值为2592000(秒),因此图片缓存和Flash内容缓存在浏览器中保留一个月。