如何在IIS中设置静态文件的可达性? [英] How do I set the cachability of static files in IIS?

查看:215
本文介绍了如何在IIS中设置静态文件的可达性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在基于IIS 6的网站上的文件夹中有一些静态图像,我希望尽可能少地下载(以保留带宽)。我已将内容过期设置为在30天后过期。我还能在IIS中做些什么来尝试最大化浏览器,代理和网关缓存的缓存吗?

I have some static images in a folder on my IIS 6-based website that I want to be downloaded as little as possible (to preserve bandwidth). I've set the Content Expiration to expire after 30 days. Is there anything else I can do in IIS to try to maximize the caching by browsers, proxy, and gateway caches?

比如添加一个Cache-Control头?还有什么吗?

Such as adding a Cache-Control header? Anything else?

推荐答案

http://www.galcho.com/Blog/post/2008/02/27/ IIS7-how-to-set-cache-control-for-static-content.aspx

这是一篇博客文章,内容如下:

This is a blog post covering the following:


  1. 允许覆盖静态内容设置

  2. 使用以下命令设置缓存设置

  3. 在客户端缓存它

这篇关于如何在IIS中设置静态文件的可达性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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