I am using it for an exam that displays only one question at a time on a page. As the user moves on from one question to the next, I don't wan't him to go back and re-answer an already answered question.

Though my scripts has several sanity checks that prevent internally from within my script the same question to be re-answered, I just needed some way to clear the history as an immediate but temporary fix to a flaw that I noticed in my design.

The flaw is, take for example you are in question number 2. I have navigation buttons on my page that allows me to move to the next, previous, first, or last item in the exam whose dynamic values are stored in a session. Now if a user goes back (through his browser) to re-answer question 1, when he clicks the next button, since in my session the next button points to Ques no 3, it would simply interpret the submission as an answer for Ques no 2 and not what the user thinks (that he's re-answering Ques No 1).


In reply to Re^2: How to Clear Browser History by soon_j
in thread How to Clear Browser History by soon_j

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.