小编use*_*466的帖子

IIS 7.5和图像未被缓存

我无法将图像文件缓存.我已尝试过在本网站和其他网站上找到的所有内容,但仍然无法让它们缓存.

我尝试过的Web配置设置

    <staticContent>
    <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" />
    </staticContent>
    <httpProtocol allowKeepAlive="true" />


    <caching enabled="true" enableKernelCache="true">
    <profiles>
    <add extension=".png" policy="CacheUntilChange" />
    <add extension=".jpg" policy="CacheForTimePeriod" duration="12:00:00" />
    </profiles>
    </caching>  
Run Code Online (Sandbox Code Playgroud)

以下是其中一个图像的响应标题

    Key Value
    Response    HTTP/1.1 200 OK
    Cache-Control   no-cache
    Content-Type    image/png
    Last-Modified   Thu, 16 Dec 2004 18:33:28 GMT
    Accept-Ranges   bytes
    ETag    "a1ca4bc9de3c41:0"
    Server  Microsoft-IIS/7.5
    X-Powered-By    ASP.NET
    Date    Fri, 18 May 2012 13:21:21 GMT
    Content-Length  775
Run Code Online (Sandbox Code Playgroud)

iis caching browser-cache iis-7.5

18
推荐指数
1
解决办法
2万
查看次数

标签 统计

browser-cache ×1

caching ×1

iis ×1

iis-7.5 ×1