Mark Fowler <[EMAIL PROTECTED]> wrote:

> On 18 Jun 2001, Randal L. Schwartz wrote:
> > Drew Taylor <[EMAIL PROTECTED]> writes:
> >
> > > This is your standard HTTP redirect (Status 302 IIRC).
> >
> > I hate this, because it messes up my back button.
> 
> Sorry - this may just be me missing the point - but how does a 302
> redirect effect your back button on the browser?  In my experience, in
> Mozilla and IE and other browsers, the 302 is automatically processed and
> considered part of the same request as the initial request.

You are right, with most browsers the user does not even notice the
redirect, and it does not affect his back button at all (if you send
the redirect in an HTTP header, not a <meta http-equiv...>). The URL
in the browser's location bar might change, but that's about it.

> Is there some problem I'm not aware of?

Someone recently mentioned (I think it was on the mod_perl mailing
list) that "302 Found" was not an appropriate response to a POST 
request. The "303 See Other" response has been introduced to deal with 
this, but browser behavior is inconsistent with this response. 302 has 
always worked fine for me, but I fear it's not RFC2616-compliant.

In addition, there seems to be a bug in Netscape Navigator 4.?  that
results in a "Document contained no data" message if you redirect to
the same URI after a POST request. My quick&dirty workaround for this
behavior was to redirect to the same URL, but append a random parameter
to the query string.

I'm also interested in a cleaner solution to the resubmit dilemma;
maybe Randal's column will show us a better way (it's not online yet).


cheers,
stefan




Reply via email to