1
谁正在使用IE8的一些用户越来越缓存的内容,我添加以下代码段我的global.asax.cs迫使他们的浏览器,以获得新的内容:防止ASP.NET浏览器缓存的问题,以及测试
HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
Response.Cache.SetExpires(DateTime.Now);
Response.Cache.SetValidUntilExpires(true);
假设一般用户不知道如何修改IE中的缓存设置,我该如何测试我的更改是否可行?
我不确定为什么当我在计算机上运行相同的浏览器时,他们会遇到缓存问题(越来越陈旧的内容)? (是天真的程序员,我嘿嘿)
另外,我要确保我不会消灭他们的饼干或阻止其cookies的存储等
非常近期的博客文章在这:http://madskristensen.net/post/Cache-busting-in-ASPNET.aspx – Oded
@Oded谢谢,真的很好的博客帖子确实 – Tx3
此链接已改变自那时以来 - http:///madskristensen.net/post/cache-busting-in-aspnet - 看起来他只是删除了.aspx – Jarrod