[Catalyst] Re: forwarding to chained actions

A. Pagaltzis pagaltzis at gmx.de
Tue Apr 24 12:00:20 GMT 2007

* Roberto Henríquez <roberto at freekeylabs.com> [2007-04-24 11:00]:
> if you end your update action with a forward, you also have
> another problem. The user ends up viewing the data item under a
> "/data/xxxx/update" URL; I consider way more elegant to issue a
> redirection to the "view data" uri right after the update.
> Thus, in your case I would do
> $c->res->redirect( $c->uri_for( "/data/$id") );
> after the update is done. And the address displayed in the
> browser would be "/data/xxx" instead of an ugly "update" url.

Not only is it ugly, it also means users will bookmark the wrong
things, and if they use the back button, they will end up
resubmitting a form sooner or later.

_ALL_ POSTs should be followed by a redirect, ALWAYS.

* Bernhard Graf <catalyst2 at augensalat.de> [2007-04-24 11:15]:
> Well, thank you, but redirects are the things I try to avoid
> for several reasons.

Can you tell us what they are?

Aristotle Pagaltzis // <http://plasmasturm.org/>

More information about the Catalyst mailing list