HTML - Form data kept with "Back" button

Discussion in 'Web Design & Coding' started by Swi, Mar 15, 2004.

  1. Swi

    Swi gningnegneur

    Messages:
    302
    Location:
    Montreal
    Hello group!
    Here's my problem: a user fills a regular web form, submits it, sees the result, hits the Back button and all the form data are gone... Is there a way to force the browser to keep it? It occurs on IE (6), but not on Netscape or other browsers like Mozzilla or Konqueror (Linux).
    This page is loaded from a CGI (which parses an existing html page and replaces stuff) and the very last solution would be to keep all form data on a submit, but even then, if the browser read the page from the cache, the CGI wont be recalled....

    Anything I could put in the HTML code to do that?

    Thx!

    Swi
     
  2. Xie

    Xie - geek - Subscribed User Folding Team

    Messages:
    5,275
    Location:
    NY, USA
    there is a way to do this in the CGI code if I remember correctly ... been a while since I have touched CGI though. :/
     
  3. Swi

    Swi gningnegneur

    Messages:
    302
    Location:
    Montreal
    The problem with CGI is that it is not recalled when the browser loads the page from its cache... Also, as there's no such problem with other browsers, I would just hope there a simple (html) way to do it.
     
  4. ignipotentis

    ignipotentis OSNN Addict

    Messages:
    127
    The simple answer is NO. if you want to do something like this you need to utilize cookies. The problem with cookies are that you are limited in size and number allowed. I suggest you build in a back button into your form and have it act as another submit button. A little bit of javascript will allow you to have multiple actions to the same form. This way, the user is encouraged to NOT use the browsers back button.