Subject: remembering last login webpage.
Posted By: jenjenyan Post Date: 2/6/2004 5:44:48 PM
I am creating a registered users only site using MS ACCESSS database. When a registered-user logs out, how would I 'bookmark' it such that it will remember the last web page that he logged out at? Then, when he logs back in, i want him to be on the same web page where he last log out.



Reply By: Greg Griffiths Reply Date: 2/8/2004 7:57:02 AM
If you are using either the SESSION or APPLICATION objects, then you could use their ON END functionality to trap this, alternatively you could set a cookie on the client side every time a page is unloaded using the ONUNLOAD function.
Reply By: planoie Reply Date: 2/9/2004 10:44:33 AM
Using the session and application objects would limit you to the session timeout limit and the lifespan of the application (reset when IIS is cycled or the machine is rebooted).  If you want to save the information indefinately and not have it tied to a user session, I would recommend saving the current page to their user data in the DB when they log out.  Of course this will only work if they actually log out.  You could save the current page on every page hit, so that if they log out or just close the browser you'll have the current page already saved.  Then when they return and log in, you can look up that value and redirect them to that last page.  You'll have to make your logic that saves the current page only save the page location if the user if logged in so the return hit to the login page doesn't get logged. (You probably wouldn't even want to bother to log it anyway as that wouldn't be a logical place to return to once they are logged in.)

Peter
------------------------------------------------------
Work smarter, not harder.

Go to topic 9351

Return to index page 953
Return to index page 952
Return to index page 951
Return to index page 950
Return to index page 949
Return to index page 948
Return to index page 947
Return to index page 946
Return to index page 945
Return to index page 944