|
-
Jul 21st, 2004, 02:21 PM
#1
Thread Starter
Hyperactive Member
how to disable the page if user push 'back'
how to disable the page if user push 'back'
I have an aspx page. A user can push 'logout' button to logout. However, after logout, if the user push 'back' botton in IE's menu, the IE will show the aspx page before logout. How can I prevent this? So, after logout, even user push 'back', it won't show the page.
thanks
-
Jul 22nd, 2004, 01:20 AM
#2
VB Code:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
-
Jul 22nd, 2004, 04:33 AM
#3
Fanatic Member
I didn't know that.
Nice one froggo
-
Jul 22nd, 2004, 06:42 AM
#4
What do you normally use?
-
Jul 22nd, 2004, 10:54 AM
#5
Thread Starter
Hyperactive Member
Originally posted by mendhak
VB Code:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
thanks. however, where should I use it?
For example, I have 3 pages,
1st is for login, 2nd is for some processing, 3rd is for logout.
on the 2nd page, it has some buttons. when users push button, it will do some computation. Now, I put
Response.Cache.SetCacheability(HttpCacheability.NoCache)
at the beginning of each page's page_load event. after users logout, if the user push 'back' on IE, it shows 'the page expires .....'. However, if the user push 'back' again, the 2nd page shows up and the user can still use those buttons to do computations.
Is there a sample project for using
Response.Cache.SetCacheability(HttpCacheability.NoCache)
thank you very much.
-
Jul 23rd, 2004, 01:17 AM
#6
Here's a sample:
http://samples.gotdotnet.com/quickst...utcaching.aspx
I could suggest another way...
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|