Greetings all,
Maybe I don't fully understand the issue but I would think that on each login by a user you could clobber the previous JS cookie by resetting it.
To get around the issue of a previous user wanting to revisit where they were on their last login you would need to store the contents of their cookie in a db || text file associated with their account information.
So the flow would be something like:
- User logs in.
- The system authenticates their username and password and selects out their last-visited postion in the tree.
- The JS cookie is set with the last-visited information by writing the JS code from within Perl to populate the correct value.
- User browses around updating the JS cookie for their last-visited location.
- Upon loggin out you would need to write some JS code to post to a Perl script that will store the value of the JS last-visited cookie. This could be accomplished by using a hidden field to pass the last-visited value to your logout script and deal with it there.
Are you absolutely sold on using JS for your cookies? I would think using Perl for all the cookies would be a bit easier to maintain. Or is the entire Tree rendered in DHTML? so there are no subsequent server requests that go out while browsing?
-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo