Thursday, May 24, 2007

Prevent page caching in ASP.NET

Having problems with the client caching pages in ASP.NET? Put the following three lines in the Page_Load event handler in your forms:

Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")

No comments: