473,387 Members | 1,757 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,387 software developers and data experts.

How to prevent refresh after logout?

Hi,

Let me give a brief first. When someone logs in my application with
correct username and password, I set a session attribute, say "user"
with his username.
When he logs out, I invalidate the session and remove the attribute
"user". In each of the protected pages, I check for the session
attribute "user". If it exists, I proceed, else I rdirect to login
page.
Btw, I am also using frames when the user logs in.
Everything is working as I want it to. Except one thing! After the user

logs out and then goes back using "back" button of the browser, the
page displayed says that he has been logged out and needs to login
again. But if he refreshes the page (after going "Back"), the page
reloads with correct information, as if he is already logged in.
What do I do to prevent this?
I am fairly new to JSP. So, maybe I am missing out on something....
Please help.

Jul 9 '06 #1
2 5052
wrote on 09 jul 2006 in comp.lang.javascript:

[...]
I am fairly new to JSP. So, maybe I am missing out on something....
JSP is kind of serverside Java, I think,

Java != Javascript.

This NG is about Javascript, and mostly clientside at that.

Try another NG.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 9 '06 #2
Rik
mi***********@gmail.com wrote:
Everything is working as I want it to. Except one thing! After the
user

logs out and then goes back using "back" button of the browser, the
page displayed says that he has been logged out and needs to login
again. But if he refreshes the page (after going "Back"), the page
reloads with correct information, as if he is already logged in.
What do I do to prevent this?
I am fairly new to JSP. So, maybe I am missing out on something....
Don't know a thing about your code, but:
- do you destroy the session properly?
- prevent caching of secured pages.

Grtz,
--
Rik Wasmus
Jul 9 '06 #3

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

Similar topics

7
by: George | last post by:
I am trying to set up a login-logout website. I have a cookie about the login status. I put it as logout once the logout link is clicked. And I put a little security check about the status of...
8
by: Judy Ward | last post by:
I have an index.aspx with frames. The top frame has a navigation bar with a "Login" hyperlink. If the user has already logged in I want this link to change to "Logout". I am using forms-based...
2
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
Hi, I have created a Logout ASP.NET application using Forms Authentication. When a user logs out they get a confirmation page confirming logout and a button to click to return to the homepage....
2
by: Pop | last post by:
Hi all! Here's the situation I have a frame set with 3 frames, banner, contents and main. I have my login.aspx in banner and after login, I redirect back to index.aspx where my frameset at....
18
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site...
5
by: Andy | last post by:
Hi, I want to prevent the user from viewing the previous page using the Back button after logout. I want to instead show that this page has expired. How do I do this? Here is my codebehind...
4
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hi, How can I prevent from an ASP.NET page to resend all the data again when the user press the Refresh button or F5 on the browser? Thanks in advanced, Asaf
2
by: =?ISO-8859-1?B?UOVsIEEu?= | last post by:
Have a "standard" asp.net web solution which uses the standard asp.net authentication and authorization methods (forms authentication). Some users have raised concern that even if you logout...
2
by: dmc2409 | last post by:
Well, I am more a desigber than developer. Need to solve the folloving problem. I have a page on, lets call it Firstserver. It opens Page1, Page2 and Page3 on Secondserver through a frame on the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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...

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.