Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 5th, 2003, 07:17 AM
Registered User
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default login logout...

hello everybody,
               I am preparing an asp login logout script with session variables.But i am facing a problem that after i successfully log out from my page, i can go to the previous page by using the back button.How can i curb this problem that whenever i go to the previous page after logging out i should get the message as to that my session has expired.
Can any body please help me.

Sunmeet Singh Sethi
Old December 5th, 2003, 08:30 AM
Authorized User
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to MAMBONO

even if you were to go back to the other page, yu would just be able to see what was there initially, but you can't access more than what you see. If you hit the refresh button, you are supposed to see the session expired message. The simplest trick to go against the back button is to close the page immediately after log off. I have not worked out any other better method for this apart from using the javascript page close property by putting it into the meta tag refresh content section, whereby the page will close after the time set. The code for this is:
<META HTTP-EQUIV=Refresh CONTENT="15; URL=JavaScript:window.close()">
Keep in mind that this code is to be put in the head section
Old December 5th, 2003, 11:39 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

If you are that concerned with this problem you could force every page to expire immediately, or in after reasonable length of time (minutes, seconds?). If the page is set to expire immediately, even when they hit the back button, the browser will re-request it, thus running your code that validates that they are logged in. Then you could display the message, or just kick them back to the login page.

Work smarter, not harder.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Login Logout Apocolypse2005 PHP Databases 1 September 25th, 2008 01:17 AM
Authentication, Login, logout and security feature hendyhanusin ASP.NET 1.x and 2.0 Application Design 1 March 22nd, 2007 08:39 PM
How to give login logout Facility cbpanchal VB How-To 2 July 28th, 2004 06:42 AM
login logout problem... sunmeet122 Classic ASP Professional 2 April 15th, 2004 09:47 PM
Login/Logout user tracking shmoel BOOK: Beginning ASP 3.0 0 December 9th, 2003 05:40 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.