我有一个页面,其中我没有使用此代码使用缓存:
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
HttpContext.Current.Response.Cache.SetValidUntilExpires(false);
HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
现在我想知道:使用正确的链接进入此页面或使用浏览器后退按钮回来之间有什么区别,或者有没有办法检测到这个?
答案 0 :(得分:0)
没有确定的方法,但我的猜测是使用后退按钮,没有设置HTTP引用。当然,还有其他原因可能导致无法设置HTTP引用。
答案 1 :(得分:0)
我认为在后退按钮中,浏览器缓存用于获取页面。它比使用正确的链接更快。