Hi. I have a basic question here. How exactly does a redirect_to (HTTP
302) work? If I have a redirect_to(URL), does it basically send back an
HTTP 302 back to the client, as in browser and then the browser asks for
the redirect_to URL? Or, do the redirection happen on the web server
without going back to the client? I’m a little confused here because I
would imagine that a redirect_to would slow things down.
Say I have a login controller and a user controller. If a user signs
in, I have them execute the login/login controller/action and if that is
successful, I will redirect_to them to an action in the user/index
controller/action. If the redirect_to causes another roundtrip,
wouldn’t it be better to just execute the user action and template in
the login controller?
Thanks for your help.