Not sure I understand what the browser's back button (or form re-submission) has to do with session expiry.  Anyway... don't expect the browser to handle your session. Any checks that matter to the integrity of your program logic should be done server-side. That includes handling session data. In short, you can't effectively control a browser (or any other HTTP client) to not resend form data... so if it matters, you'll have to check for that case server-side (for example by assigning a one-time unique ID to every form sent to the browser and then keeping track of which IDs/forms have already been submitted...  or some such).

That said, in case your problem rather is that the session data isn't being deleted server-side, you might just need to call flush after having called the delete method — in case you're using CGI::Session, that is. The module is known to often need explicit flushing.   Some more details (e.g. if this is normal CGI or some persistent environment, etc.) and some sample code would help to give us a better idea of what your exact problem is.


In reply to Re: Session problem by almut
in thread Session problem by priti

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.