【问题标题】:iis 7.5 http response headers does not workiis 7.5 http 响应标头不起作用
【发布时间】:2012-09-14 23:45:28
【问题描述】:

我在特定文件夹中有一些静态内容,jpg、png。

我希望将 HTTP 标头设置为 30 天后过期。

使用 IIS 7.5 >> http 响应标头 >> 设置公共标头 >> 过期网页内容

我添加了我的值,但我仍然得到静态内容的 HTTP 标头(expiration not specified)

我已经尝试在 IIS 中刷新我的网站,但它没有解决我的问题。

有什么想法吗?

【问题讨论】:

标签: iis iis-7 iis-7.5


【解决方案1】:
Give this a try with application pool -> ManagedpipelineMode : **Classic**
 <system.webServer>
   <staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"  cacheControlCustom="public"/>
    </staticContent> 
 </system.webServer>

你也可以检查如何在 ui 中配置它 http://www.iis.net/configreference/system.webserver/staticcontent/clientcache

【讨论】:

    猜你喜欢
    • 2011-12-18
    • 2016-09-12
    • 1970-01-01
    • 2017-10-14
    • 2013-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-13
    相关资源
    最近更新 更多