views:

32

answers:

2

the frameworks i've used (granted not that many.. pylons,cakephp,rails,etc) all seem to use a client side redirect when going from 1 controller action to another. wouldn't it be better to save a roundtrip and do the redirect server side?

of the top of my head, i can only think that it's to rewrite the url in the client browser.. is there anything else i'm missing?

+2  A: 

Header redirects after form submission are done to prevent re-POSTing when refreshing the page (or the like)

Jonathan Fingland
+1  A: 

They may want to support cross-host redirects, redirects to SSL, or redirects to other content types (assuming some of the http headers have already been written).

In trying to be as general-purpose and flexible as possible, they fail to optimize for any particular case, even the more common cases. This tendency to be jack-of-all-trades-master-of-none is typical of frameworks.

Bill Karwin