Caching in ASP and ASP.NET
Hi,
In ASP, I always include the following lines in every page in order to force the page to reload in every visit:
Response.Buffer = true
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
Is it necessary to do the same thing in ASP.NET?
I see that 'Buffer' is available as a property for 'DOCUMENT' in VS.NET, but not the others. Is there any standard way for this?
Thx!!
Re: Caching in ASP and ASP.NET
You can use that same code, or you can simply try this:
VB Code:
Response.Cache.SetCacheability(HttpCacheability.NoCache)