How to clear the cache
Please provide me some code in VB.net to clear the cache from web page
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted May 23, 2008, 3:09 PM EDT
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Expires = 0
Response.ExpiresAbsolute = Convert.ToDateTime(DateTime.Today.AddDays(-1))
Response.AddHeader("pragma", "no-cache")
Response.AddHeader("cache-control", "private")
Response.CacheControl = "no-cache"