How can web form content be preserved for the back button

Posted by Peter Howe on Stack Overflow See other posts from Stack Overflow or by Peter Howe
Published on 2008-10-29T16:54:43Z Indexed on 2010/06/18 16:43 UTC
Read the original article Hit count: 300

When a web form is submitted and takes the user to another page, it is quite often the case that the user will click the Back button in order to submit the form again (the form is an advanced search in my case.)

How can I reliably preserve the form options selected by the user when they click Back (so they don't have to start from scratch with filling the form in again if they are only changing one of many form elements?)

Do I have to go down the route of storing the form options in session data (cookies or server-side) or is there a way to get the browser to handle this for me?

(Environment is PHP/JavaScript - and the site must work on IE6+ and Firefox2+)

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript