如何给Flash和Icon组件添加Expires
Yslow 目前为我的网站以及“添加过期标题”授予 B 级。
它说:
有 1 个静态组件,没有远期到期日期。
* (no expires) http://localhost/images/favicon.ico
我的 apache.conf 中当前的 Expires 代码是这样的:
ExpiresActive On # enable expirations
# expire after a week in the client's cache
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpg A604800
ExpiresByType image/jpeg A604800
ExpiresByType text/css A604800
ExpiresByType application/javascript A604800
那么 flash 和 icon 组件的语法应该是什么?
尽管 Yslow 没有针对 Flash 显示,但我想为 Flash 组件添加 Expires。
任何人都可以帮助我完成这项任务吗?
Yslow is currently giving Grade B for my site and also for "Add Expires Headers".
It says:
There is 1 static component without a far-future expiration date.
* (no expires) http://localhost/images/favicon.ico
The current Expires code in my apache.conf is like this:
ExpiresActive On # enable expirations
# expire after a week in the client's cache
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpg A604800
ExpiresByType image/jpeg A604800
ExpiresByType text/css A604800
ExpiresByType application/javascript A604800
So what should be the syntax for flash and icon components?
Even though Yslow is not showing for flash, I want to add Expires for flash components.
Can any one help me out in achieving this task?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
打开 Firebug 快速访问 homestarrunner.com,发现内容类型为
application/x-shockwave-flash
(对于 flash)和image/x-icon
(对于 favicon)。A quick visit to homestarrunner.com with Firebug open says that the content type is
application/x-shockwave-flash
for flash andimage/x-icon
for favicon.