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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.