页面对客户端做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);

你可能感兴趣的:(客户端)