Multifacetted Monks,

So, I'm generating these great submission-confirmation pages with Template Toolkit: when a user submits their choices through an html form, we process it with cgi.pm, store the results in our mysql db, and return a page confirming all the information they just submitted.

The user's happy, so they click on to another page - but then they have a doubt and hit "Back" on their browser to look at the confirmation page again - and they get the ugly "Warning page has expired" page. "The page you requested was created using information you submitted in a form. This page is no longer available....To resubmit your information and view this Web page, click the Refresh button. "

Of course, if they do hit refresh, it does cause a resubmit, and the system is designed to catch a double submission and throw a warning, not the page they just wanted to double check.

Is there anything I can output with the confirmation page - I'm thinking some kind of header - that will allow the user to go "Back" to the page without the browser thinking it has to re-submit the form, and just pull it out of cache?

Thanks.




Forget that fear of gravity,
Get a little savagery in your life.

In reply to How to avoid "Page expired" going back to post-CGI form confirmation? by punch_card_don

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.