页面对客户端做304缓存

页面对客户端做304缓存

核心代码

1 HttpRuntimeSection runtime = new System.Web.Configuration.HttpRuntimeSection();
2 runtime.EnableKernelOutputCache = false;
3 Response.Cache.SetLastModified(DateTime.Now);
4 Response.Cache.SetExpires(DateTime.Now.AddSeconds(5));
5 Response.Cache.SetCacheability(HttpCacheability.Public);
6 Response.Cache.SetValidUntilExpires(true);
posted @ 2010-10-11 14:31  双击  阅读(204)  评论(0)    收藏  举报