日期:2014-05-17  浏览次数:20938 次

WebForm页面加载后,多次使用清缓存代码,IE无法加载页面
在Page_Load里使用了如下代码122次后,页面就无法加载了。而,121次却可以,请高人指点。

HttpContext.Current.Response.Buffer = true;
        HttpContext.Current.Response.Expires = 0;
        HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);   //DateTime.Now.AddDays(-1); 
        HttpContext.Current.Response.AddHeader("pragma", "no-cache");
        HttpContext.Current.Response.AddHeader("cache-control ", "private");
        HttpContext.Current.Response.CacheControl = "no-cache";
        HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
        HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(true); 

------解决方案--------------------
删掉这些多余的代码,会有什么问题?