Expire IE browser cache, again.

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
 
K

kurt sune

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

/k
 
B

Bruce Barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top