title: How to remove confirm form resubmission with Python Bottle framework
body: <p>I have:</p>
  
  <ul>
  <li><p><code>page1</code>: submits a form</p></li>
  <li><p><code>page2</code>: validates it and and returns a page</p></li>
  </ul>
  
  <p>Now when I click the back button, it does not go to page-1 instead it comes with a "Confirm form resubmission" window.</p>
  
  <p>How do I prevent this? Based on <a href="https://stackoverflow.com/q/3923904">this answer</a>, I see this as a recommended approach:</p>
  
  <blockquote>
    <p>This is a common technique on forums. Form on Page1 posts the data to
    Page2, Page2 processes the data and does what needs to be done, and
    then it does a HTTP redirect on itself. This way the last "action" the
    browser remembers is a simple GET on page2, so the form is not being
    resubmitted upon F5.</p>
  </blockquote>
  
  <p>But I'm confused. Where should I append my redirects? My <code>page2</code> view looks like this:</p>
  
  <pre><code>@app.route('/StartPage',method='POST')
  def test():
      username = request.forms.get('username')
      password = request.forms.get('password')
      return template('StartPage',search_string=search_string,\
                      username=username, \
                      session_id=ses_id)
  </code></pre>