By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,805 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,805 IT Pros & Developers. It's quick & easy.

how to disable back button after the log out?

P: 2
hi there
i am new in website development and try to develop website in advanced java like jsp with hiberante.
so now i want to create security for after logout from the site pages.
so i need to disable my backbutton of browser after the logout.
how can i do that plz help me
thanks in advanced.
Aug 5 '12 #1
Share this Question
Share on Google+
5 Replies


P: 75
use if else .
Expand|Select|Wrap|Line Numbers
  1.  btnConvertDocuments.setEnabled(false);
Aug 5 '12 #2

ariful alam
100+
P: 185
you can use a cookie settings or session setting after a successful log in and whenever a user click on log out button, you can erase/empty the cookie/session information. And you can check cookie/session information in all pages those are appear just after successful log in and if the cookie/session information is null/empty just redirect those pages.

so, after log out, if any user click on back button from the browser the backed page will check the cookie/session information. as this time the the cookie/session information is already empty, the page will redirect to other page. so, the user can't access those pages after log out or before log in.

Hope it helps!
Aug 5 '12 #3

P: 75
i confuse is this java or javascrip?
Aug 6 '12 #4

kadghar
Expert 100+
P: 1,295
What ariful alarm said was java, but it's good for any server-side script engine. And it's a good way to do it.
Aug 7 '12 #5

Frinavale
Expert Mod 5K+
P: 9,731
If you're interested in indicating that the user has logged out, check out this thread: Logout user on.... The post uses an ASP.NET page for the server side functionality, but that can be replaced with a .php page, .jsp page (java), web service calls...or any server side technology that you prefer.

-Frinny
Aug 7 '12 #6

Post your reply

Sign in to post your reply or Sign up for a free account.