clearing form/page cache

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In asp we have "Response.Expires = 0" and I've tried:
HttpResponse.RemoveOutputCacheItem("page location")
But I can't get the page to display new. This is a problem if the data is
changed and the page is revisted. I find it hard to believe that adding a
bogus random value to the url is the only method to avoid this?

If I press the refresh button on my IE6 browser the page displays the
correct data. How is this accomplished?

Thanx.
 
I've found this:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

and I think it will work. But still wonder if there is a more programmic way
to clear.
 
Chris, if you search out here on "no-cache" you'll see a bunch of discussion.
I came across the following a few months ago which works for me
(unfortunately I didn't keep the source to credit):

response.expires = 0
response.cache.setnostore()
response.appendheader("Pragma", "no-cache")

hth,

Bill
 
Thanx, I did and I wouldn't say a bunch. I always try to first search
postings and the web. I missed the tag <Meta..> reference though :).
As I mentioned, I haven't been able to get the good ole reponse.expires = 0
to work. I haven't tried though "response.cache.setnostore()", your last is
really the Meta tag. I'll give the 2nd a try. I couldn't get:
HttpResponse.RemoveOutputCacheItem("page location")
to work either and that was on another post?????

thanx :)
 
Back
Top