html - 利用浏览器缓存

标签 html iis configuration windows-server-2003 http-caching

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

Leverage browser caching
The following resources are missing a cache expiration

搜索仅返回有关在 Apache 下使用 htaccess 的信息,但我的站点运行在 Windows 2003 Server 上,使用纯 HTML 语言,我什至无法访问服务器。

有什么方法可以像它建议的那样指定过期和 gzip 压缩吗?

最佳答案

看看内容过期,它应该可以解决缓存方面的问题。

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

设置网站内容的过期时间

  1. 在 IIS 管理器中,双击本地计算机;右键单击网站文件夹、单个网站文件夹、虚拟目录或文件;然后单击“属性”。

  2. 单击“HTTP header ”选项卡。

  3. 选中启用内容过期复选框。

  4. 单击“立即过期”、“在此后过期”或“过期于”,然后在相应的框中键入适当的过期信息。

  5. 单击“确定”。

关于html - 利用浏览器缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1994223/

相关文章:

ssl - 从 ssl-terminating-point 后面的 glassfish 连接到第三方双向 https ws

asp.net-core - 在 Windows Server 上调用 ASP.NET Core 2.1 Web API 时出现 "500 - Internal server error"

javascript - XMLHttpRequest 无法加载 http ://localhost:8081/sample. xml。 Access-Control-Allow-Origin 不允许 Origin null。

python - TOML,YAML和StrictYAML

c++ - 在 Qt HTML5 应用程序中使用 QtWidgets

php - 带有 CSS 颜色的事件链接

testing - 错误 : no browser selected to run against, 但我在 .testcafe.json 中提到了它

c++ - Visual Studio 2008 : Use external Debug-DLL for Debug-Run and external Release-DLL for Release-Run

javascript - 如何按比例缩小 <img> 元素并将其 WxH 中较短的设置为固定数字?

html - 将两个 DIV 并排放置