Click to See Complete Forum and Search --> : page expire


pmmbala
July 12th, 2002, 02:40 AM
hi friends,
how can i make a page unavailable when someone hits their back button?

i am using these sts.. but some pages wont work..
Response.Expires = -1
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"

Thanks
Bala

ScaryBinary
July 12th, 2002, 04:04 PM
I use the same tactic and it always seems to work for me. The only difference is that I set the Expires time to a big negative number like -1000.

Do you a notice a pattern concerning the pages that don't work?

Jorge22
July 15th, 2002, 09:35 AM
try this on the page you want to expire:

Response.Cache.SetExpires(DateTime.Now.AddSeconds(1));
Response.Cache.SetCacheability(HttpCacheability.Private);
Response.Cache.SetRevalidationHttpCacheRevalidation.AllCaches);