【发布时间】:2009-07-21 06:49:08
【问题描述】:
今天我使用YSlow 检查了我的网站的性能统计数据。我收到如下警告(或可能是错误)
Add Expires headers
There are 15 static components without a far-future expiration date.
* (no expires) http://www.example.com/video/css/global.css
* (no expires) http://www.example.com/video/js/global.js
* (no expires) http://www.example.com/video/images/main-bg.png
这意味着什么以及如何在 PHP 和 ASP.NET 中实现这一点。我在共享主机服务器上,所以请告诉我一些使用代码的方法,因为我无法在服务器端进行任何修改。
如果我要让标头过期,那么如果我在 CSS 中进行更改,那么用户将不会立即获得它们,因为 css 和其他文件被缓存了一定的时间限制(1 个月,一周)。是吗?
使用过期标头有什么缺点吗??
【问题讨论】:
标签: php asp.net performance http-headers yslow