clearing form/page cache

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.
 
G

Guest

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.
 
G

Guest

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
 
G

Guest

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 :)
 

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,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top