in reply to Problem with form submission and redirect

Using "Refresh" with time=0 is a problem in most browsers.

You'd better use a bigger time (5 seconds is ok) and put a small message in the page ("You are being redirected to ... " with a link). This will allow the user to press "back" to go back to your form, or press the link to go fast forward. If it doesn't connect to the redirected page, the user can press "back" 2 times to get to the form.

  • Comment on Re: Problem with form submission and redirect

Replies are listed 'Best First'.
Re: Re: Problem with form submission and redirect
by Arcanum (Sexton) on Aug 26, 2002 at 16:37 UTC

    Hmm, I've never had a problem with a zero second refresh time. I've tested it with IE 5.0 and 5.5; Mozilla 1.0 and 1.1b; and Opera 6.0x.

    Hitting the back button twice will solve the problem, but that relies on the end user having the wherewithal to realize they need to do that. I do see how a five second delay with a link should give them an opportunity to hit "back" twice, but I'm not sure I want to rely on anyone's ability to figure that out. Unfortunately.

      Please do not use the HTML hack for redirect if you're generating the entire response anyway. The HTML hack is merely for those (hopefully rare) situations where only the content of a page is accessible to the content provider. In a CGI situation, this is clearly not the case.

      I'd suggest studying the redirect method of the CGI module.

      And yes, I'd fail your code in a code review because of that. Red flagged, not permitted to be deployed.

      -- Randal L. Schwartz, Perl hacker