How can I set cache-control to "no-cache,no-store" in ASP.NET? Do I have to implement a cache module whic开发者_StackOverflow社区h caches every response, or can it be done using OutputCache in ASPX page itself?
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "no-cache");
Response.AddHeader("Pragma", "no-store");
Response.AddHeader("cache-control", "no-cache");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoServerCaching();
精彩评论