473,422 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,422 software developers and data experts.

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 1932
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********@hotmail.com> wrote in message
news:uc****************@TK2MSFTNGP11.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**************@TK2MSFTNGP10.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********@hotmail.com> wrote in message
news:uc****************@TK2MSFTNGP11.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
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...
2
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...
5
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...
1
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...
1
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...
4
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...
5
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...
13
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...
3
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. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.