Add Future Expires Headers

[不指定 2009/08/21 16:40 | by askwan ]
无它 可以增加YSlow得分

apache配置文件http.conf 或者 .htaccess文件 根据需要自行添加


<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Fri, 08 Aug 2010 08:08:08 GMT"
</FilesMatch>


注意:

1。若有很多静态文件,如ico,jpg,css,js,gif之类的文件长时间不会改变或者更新的,用此方法甚好

2。若这类文件更新比较频繁,那过期时间就设置得距离现在短一点。


作者:askwan@『AskWan』
地址:http://www.askwan.com/YSlow_Add_Future_Expires_Headers/
可以转载,转载时请以链接形式注明作者和原始出处及本声明!

Tags: , ,
Oprating System | Comments(0) | Trackbacks(0) | Reads(859)
收藏到网摘:百度搜藏 Google书签 Yahoo收藏 新浪ViVi收藏夹 365天天网摘 天极网摘 我摘·网摘·网络书签 POCO网摘 和讯网摘 Bolaa博拉博客收录中心 天下图摘
Add a comment
Emots
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
Enable HTML
Enable UBB
Enable Emots
Hidden
Remember
Nickname   Password   Optional
Site URI   Email   [Register]