利用浏览器缓存 [英] Leverage browser caching

查看:231
本文介绍了利用浏览器缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,当我使用Google插件检查网页速度时,我会收到:


利用浏览器缓存

以下资源缺少缓存过期


搜索仅返回有关在Apache下使用htaccess的信息,但我的网站正在运行



有没有任何方法来指定过期和gzip压缩,因为它可以在Windows 2003 Server上使用纯HTML语言,我甚至不能访问服务器。建议?

解决方案

看看内容过期,应该在缓存上为你做伎俩。



http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/0fc16fe7-be45-4033-a5aa-d7fda3c993ff.mspx?mfr=true



设置网站内容的到期时间


  1. - 点击本地计算机;右键单击网站文件夹,单个网站文件夹,虚拟目录或文件;然后单击属性。


  2. 单击HTTP标头选项卡。内容过期复选框。


  3. 点击立即过期,到期或到期,然后在相应的框中键入相应的过期日期信息。

    / li>
  4. 按一下[确定]。



I have a website and when I check page speed with Google plug-in, I receive:

Leverage browser caching
The following resources are missing a cache expiration

Searching only returns information on using htaccess under Apache, but my site is running on Windows 2003 Server, in plain HTML language, and I don't even have access to the server.

Is there any way to specify expiration and gzip compression, as it recommends?

解决方案

Have a look at Content Expiration, that should do the trick for you on the caching.

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/0fc16fe7-be45-4033-a5aa-d7fda3c993ff.mspx?mfr=true

To set the expiration of Web site content

  1. In IIS Manager, double-click the local computer; right-click the Web Sites folder, an individual Web site folder, a virtual directory, or a file; and then click Properties.

  2. Click the HTTP Headers tab.

  3. Select the Enable content expiration check box.

  4. Click Expire immediately, Expire after, or Expire on, and type the appropriate expiration information in the corresponding boxes.

  5. Click OK.

这篇关于利用浏览器缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆