showModalDialog缓存清除

来源:互联网 发布:php抓取页面内容 编辑:程序博客网 时间:2024/05/29 14:27

 (1)   服务端
            Response.Buffer = true
;
            Response.ExpiresAbsolute 
= System.DateTime.Now.AddSeconds(-1
);
            Response.Expires 
= 0
;
            Response.CacheControl 
= "no-cache"
;
            Response.AddHeader(
"Pragma""No-Cache"
);
    (2)   客户端

在页面的Header中加入以下代码

<meta http-equiv="pragram" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache, must-revalidate" />
<meta http-equiv="expires" content="0" />

 

(3) 可以通过向 Web.config 文件中的  添加 enableOutputCache="false" 来对整个应用程序禁用页输出缓存。

<caching>

<outputCache

    enableOutputCache="true|false" 

    enableFragmentCache="true|false"

     sendCacheControlHeader="true|false"

    omitVaryStar="true|false">

 

</outputCache>

</caching>

资料:http://msdn.microsoft.com/zh-cn/library/ms228124(v=vs.80).aspx