View Full Version : session expire page
petertran123
11-15-2002, 08:06 PM
Hello,
Can someone help me with the code on how to set a expiration page.
I have 2 forms: first form is asking user information and second form is to confirm. However, i wanted to set a expire statement at the confirm page for not allowing user to click on the back button on browser while they are on confirm page. On the confirm page there is only a single button to submit. I don't want them to be able to go back and do the change. Eventually, they are on confirm page and want to click on the back button on browser i want the page expired and will not displayed or redirect them to the login page. Does it sounds confuse to you?
Please help me
whammy
11-16-2002, 11:38 PM
Hmm. That is a bit confusing. They'll always be able to start over by exiting your page, and going back to the URL.
Why don't you want them to be able to edit what they entered? What if they made a mistake? :confused:
Can you explain what you're trying to accomplish in more detail? :)
whammy
11-17-2002, 12:41 AM
P.S. Here's a simple javascript method of keeping people from going "back":
<script type="text/javascript">
<!--
history.forward();
// -->
</script>
petertran123
11-18-2002, 04:33 PM
Thanks my dearest Whammy,
i'm sorry for your confusing. In my situation there is a problem of that. In the middle of the processing they can modify or do what ever thay want it. But, get into the deny page of course i don't want them to be able to go back and make a change and resubmit to get an approved.
Here is a small example.
user is filing tax information and providing all of their information, when they hit to the last page and do verification. Base on their information if they are appoaved, and i should not worried about, but what if they received a deny page....? Ok, from here i want them to be redirected to the noauth page.
not caching the documents (i have tried this several ways) doesnt seem to do the trick
:confused:
whammy
11-19-2002, 12:01 AM
Hmm... there are probably a couple of ways to do this, but perhaps the easiest would be to set a session variable (if they are denied), or even better yet, write to a database whether they are denied or not.
And then if they DO go back, and try to resubmit their information, you check for this - and say "hey, you already submitted this form, and you were denied".
Make sense? :)
petertran123
11-19-2002, 03:07 PM
This is what i'm using, but it seems to work with the forward button...not on the back button of browser.
'***************
<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
'*****************
According to what you are saying, i know exactly how it works, but my problem is i don't want them to cache the document, when ever they are at the deny page i want them just sit there or redirect to the beginning page, but not able to click on the back button to go back and make a change..
whammy
11-23-2002, 12:16 AM
I wish I could help more, but I'd have to see it first hand to think of a solution I think...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.