Manoj Bisht

Manoj Bisht

  • NA
  • 140
  • 0

Stop page being cached

Aug 13 2008 8:13 AM

Hello All,
How to avoid page being cached. Actually i'm creating an Admin Panel so as i click on Log Out button it brings me over the Default page for Log-in again. But the back button of the browser still working and i want to stop it. For it  i'm using the following code. But page is still being cached.

            Response.Buffer = true;
            Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d);
            Response.Expires =-1500;
            Response.CacheControl = "no-cache";


Answers (2)