Expire IE browser cache, again.

  • Thread starter Thread starter kurt sune
  • Start date Start date
K

kurt sune

Hi,
I have checked this newsgroup and goggled in order to find out how to expire
the IE browser cache in order to ALWAYS get this text

Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available. As a
security precaution, Internet Explorer does not automatically resubmit your
information for you.

To resubmit your information and view this Web page, click the Refresh
button.




when the user presses the back button in IE 6.0.

I came up with this code:

Response.CacheControl = "no-cache"

Response.Cache.SetExpires(DateTime.Now.AddSeconds(0))

Response.Cache.SetCacheability(HttpCacheability.NoCache)

Response.Cache.SetValidUntilExpires(False)

Response.Cache.SetNoStore()

Response.AppendHeader("Pragma", "no-cache")

Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches)





Infortunately it doesnt always works.



Tips anyone?



/k
 
Nope,
some of the pages I am backing to still shows up. Usually the first and
third.

/k
 
the warning only occurs if the page navigated to in the history was the
result of a post. if it was a GET, user typed url, or the server sent a
redirect, then the warning will not appear.

-- bruce (sqlwork.com)
 
Back
Top