网页缓存有时挺讨厌的,如何在ASP.Net中让网页“立即过时”呢?no-cache
2007-07-02 22:19
555 查看
今天又遇到了网页缓存的问题,在一个窗口设置完参数保存关闭后再打开该窗口发现窗口中显示的仍是修改前的值,可以用meta解决:
<META http-equiv="pragma" content="no-cache">
<META http-equiv="Cache-Control" content="no-cache, must-revalidate">
<META http-equiv="expires" content="Mon, 23 Jan 2001 12:52:30 GMT">
奇怪的是上面三个单个试的时候有时不起作用,不知道是什么原因,只好都加上,试了N次,都起作用了。
用Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);倒是每次都能起作用。
<META http-equiv="pragma" content="no-cache">
<META http-equiv="Cache-Control" content="no-cache, must-revalidate">
<META http-equiv="expires" content="Mon, 23 Jan 2001 12:52:30 GMT">
奇怪的是上面三个单个试的时候有时不起作用,不知道是什么原因,只好都加上,试了N次,都起作用了。
用Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);倒是每次都能起作用。
相关文章推荐
- cache:缓存在asp.net中如何管理?服务器端缓存?Session, Application, Cache objectscache ,客户端缓存?Cookies,ViewState
- cache:缓存在asp.net中如何管理?服务器端缓存?Session, Application, Cache objectscache ,客户端缓存?Cookies,ViewState
- ASP.Net中让网页“立即过时”
- cache:缓存在asp.net中如何管理?服务器端缓存?Session, Application, Cache objectscache ,客户端缓存?Cookies,ViewState (转)
- ASP.Net中让网页“立即过时”
- ASP.Net中让网页“立即过时”
- \t\t【总结】ASP.NET 缓存 SqlCacheDependency 监视数据库表变化 让缓存更新的更及时更提高节能
- ASP.Net中让网页“立即过时”
- 如何动态改变asp.net网页的标题
- asp.net 提高网站速度及如何利用缓存
- 网页缓存控制 Cache-control 常见的取值有private、no-cache、max-age、must-revalidate 介绍
- asp.net缓存-SqlCacheDependency
- ASP.NET性能优化之让浏览器缓存动态网页的方法
- ASP.NET状态管理之六(缓存Cache)
- asp.net cache 缓存
- 如何在SQLServer中使用ASP.NET输出缓存?
- ASP.NET Cache缓存详解
- Asp.net 打印web 网页 如何不显示 网址 页码
- 详情ASP.NET状态管理缓存Cache应用(学习)
- ASP.NET 缓存 Cache