Re: page expiration
- From: "kpg" <ipost@xxxxxxxxxxxxxxxx>
- Date: Fri, 17 Jun 2005 14:23:07 -0500
OK. Here it is.
Put this in the page load event: Response.Cache.SetNoStore()
This prevents the browser from caching the page, which means I will always get the hit when the page is reloaded.
I found this info at:
http://www.codenotes.com/articles/articleAction.aspx?articleID=1022
-- kpg
"Kim Quigley" <kimquigley@xxxxxxxxxxx> wrote in message news:uykcE62cFHA.1684@xxxxxxxxxxxxxxxxxxxxxxx
# Name resolution details: file://c:\temp\328821.htm (6/17/2005 2:00:56 PM) #
The problem with the back button is an age old issue and I'm very interested to see if anyone is going to offer you a solution. When a user clicks the back button, the page doesn't reload, so no code is executed.
"kpg" <ipost@xxxxxxxxxxxxxxxx> wrote in message news:e0$2RO2cFHA.3712@xxxxxxxxxxxxxxxxxxxxxxxSetting Response.Expires to 0 just makes it so the browser doesn't cache the page, which doesn't sound at all like the solution to your problem.
Are you saying that if someone sees a certain page, then if they refresh or return to it, you want them to see something else or be redirected?
After the user logs on I show a page that displays a list of items previously
saved. When the user picks one I redirect them to a page with the selected
data loaded to begin processing. If they hit the back button (history) of the
browser and try to revisit the item list page I want to show that it has expired.
There should be no way for them to return to this page unless they logoff
and then back on.
If the page were not cached then the request would come to the server
and I could display a message. My problem is I put a response.expires =0
and I still got the cached page. Maybe I was using it wrong. I added it to
the top of the html page before the <head>. I also tried adding a
response.expires = 0 into the page load event with the same effect (none).
Hope that clears it up.
Thanks, kpg
.
- Follow-Ups:
- Re: page expiration
- From: Joerg Jooss
- Re: page expiration
- References:
- page expiration
- From: kpg
- Re: page expiration
- From: Kim Quigley
- Re: page expiration
- From: kpg
- Re: page expiration
- From: Kim Quigley
- page expiration
- Prev by Date: Re: Accessing ASP.NET Session or Application under old ASP
- Next by Date: Re: Could not load type(Driving me NUTS) PLS HELP
- Previous by thread: Re: page expiration
- Next by thread: Re: page expiration
- Index(es):
Relevant Pages
|