June 12th, 2000, 04:45 PM
I've got a login screen, members only area, and a function to logout. once a user logs out, it returns them to the login screen. if they left the browser like that and someone else came up to it, they could use the back button to go back to the login page where the first user filled out his login and password, then log in as the first user.
is there a way to prevent the use of the back button or erase it's history?? is there a way to force the browser window to close?
thanks for any help.
June 12th, 2000, 10:25 PM
Yes. You can use the location.replace() method. For example:
<input type="button" value="Go" onClick="window.location.replace('nextpage.html');">
The current pages history entry will be replaced with the nextpage.html and this will also load the nextpage.html.