<configuration>
<location path="WebForm1.asp">
<system.webServer>
<caching>
<profiles>
<remove extension=".asp" />
<add extension=".asp" policy="DontCache" kernelCachePolicy="DontCache"/>
</profiles>
</caching>
</system.webServer>
</location>
</configuration>在web.config中如此配置还是能缓存页面 求教有没有别的方法.
要求必须在web.config中进行配置的 不缓存页面和其中的SWF格式的文件.
求教!配置一个局部页面不缓存
<location path="WebForm1.asp">
<system.webServer>
<caching>
<profiles>
<remove extension=".asp" />
<add extension=".asp" policy="DontCache" kernelCachePolicy="DontCache"/>
</profiles>
</caching>
</system.webServer>
</location>
</configuration>在web.config中如此配置还是能缓存页面 求教有没有别的方法.
要求必须在web.config中进行配置的 不缓存页面和其中的SWF格式的文件.
求教!配置一个局部页面不缓存
/// <summary>
/// 清除客户端缓存
/// </summary>
public static void ClearClientCache()
{
System.Web.HttpContext.Current.Response.Buffer = true;
System.Web.HttpContext.Current.Response.Expires = 0;
System.Web.HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
System.Web.HttpContext.Current.Response.AddHeader("pragma", "no-cache");
System.Web.HttpContext.Current.Response.AddHeader("cache-control", "private");
System.Web.HttpContext.Current.Response.CacheControl = "no-cache";
}你是想要这个吧