473,569 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Preventing User from backing up to previous page?

I want to implement a logoff feature in my ASP.NET application (using VB),
but how do I expire or delete the pages from the cache so another user can't
simply use the back arrow to bring the pages back up?

Thanks!!

Nov 18 '05 #1
2 1941
You could use javascript and say something like:

history.go(-history.length) ;

This way there should be no more pages to go back to. Then redirect them to
a new logout page or something if you wanted to.

But...using script on the client isn't a very secure way to deny access to
pages. This would get rid of the history for the Back button, but it doesn't
prevent someone from using another method to remember the URL of the pages
they've been to (like writing it down) and then going to those pages after
they have logged out. Any security like this should really be done
server-side, not client-side.

-Darrin

"Brian Mitchell" <Ma********@hot mail.com> wrote in message
news:uc******** ********@TK2MSF TNGP11.phx.gbl. ..
I want to implement a logoff feature in my ASP.NET application (using VB),
but how do I expire or delete the pages from the cache so another user can't simply use the back arrow to bring the pages back up?

Thanks!!

Nov 18 '05 #2
Yeah, I have a session variable the gets checked when the page loads and if
they try to type the URL directly (without the session variable being set)
it will automatically redirect them to the login page. However, in my logoff
button I implement a session.clear and a session.abandon but when the user
hits the back button it still takes them back (I guess none of the form
events are fired when a user presses back)
"Darrin J Olson" <da************ @sio.midco.net> wrote in message
news:ef******** ******@TK2MSFTN GP10.phx.gbl...
You could use javascript and say something like:

history.go(-history.length) ;

This way there should be no more pages to go back to. Then redirect them to a new logout page or something if you wanted to.

But...using script on the client isn't a very secure way to deny access to
pages. This would get rid of the history for the Back button, but it doesn't prevent someone from using another method to remember the URL of the pages
they've been to (like writing it down) and then going to those pages after
they have logged out. Any security like this should really be done
server-side, not client-side.

-Darrin

"Brian Mitchell" <Ma********@hot mail.com> wrote in message
news:uc******** ********@TK2MSF TNGP11.phx.gbl. ..
I want to implement a logoff feature in my ASP.NET application (using VB), but how do I expire or delete the pages from the cache so another user

can't
simply use the back arrow to bring the pages back up?

Thanks!!


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4599
by: Bruce | last post by:
I have a number of forms that do significant work based on variables POSTed from the form. What is the common method of detecting and preventing this work from being done when the form is POSTed as the result of the user clicking the Back or Reload buttons in the browser? --Bruce
2
4757
by: BenM | last post by:
Description: I would like to prevent a user from logging in with their user/password combination on a different computer or even a different browser window, if they are already logged in. I have a login page, from which I use a DB check to verify user/password info. Also, I have a bit loggedIN field in the DB, which I use to see if they are...
5
5638
by: vincent | last post by:
Hi, If i login to the site again (may be in the same pc or different pc), system must allow me in and end my previous session. How do i go about doing this? This is to ensure that an user can have only one session at a time.
1
1161
by: Volkan Karabođa | last post by:
Hi all! I want the users not to go previous or next page with using neither keyboard nor explorer buttons. I hide the buttons on explorer when opening the page but user press back key on the keyboard page changes! tell me please how to prevent this situation. thanks...
1
1928
by: John | last post by:
Hi all, I have a situation where I'm using a modal dialog to merely show the user some data. Once the user has finished, there is only one button to click to return to the previous (parent) page but a postback is done. The modal dialog is invoked from a linkbutton on the parent. How can I prevent this unnecessary postback? Regards
4
4195
by: PJ6 | last post by:
After logging out of my test site I would like to be able to not allow the user to navigate back to previous pages. It's not super-important because if they try to do anything the login state has been wiped and anything that posts back or refreshes the page will send them back to the login screen... but it would be nice if either the...
5
2173
by: Jurgen Appelo | last post by:
I'm at a loss here... My FormView control automatically performs a databind at each postback on the server. But in some cases I don't want this to happen. Like when the business layer decides that some of the information in the controls cannot be accepted. But then the FormView binds to the datasource again, and the input in all contols is...
13
636
by: Oleg Konovalov | last post by:
Hi, I have a Java GUI application where I perform a lot of long DB operations , which takes 5-60 secs to perform. Sometimes user double-clicks the button or just gets impatient and clicks again, which created duplicate records. So I am trying to disable the button as soon as it is clicked, and as soon as it's done, re-enable it again.
3
6373
by: roshni86 | last post by:
I have the following code for a logout of an account in php.However it is not working,as when i press the "back" button,the page returns to the previous page where a user had signed and viewed. <?php //start the session session_start(); //check to make sure the session variable is registered if(session_is_registered('userid')){ ...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.