redirect_to does indeed send a 302 response to the browser, which causes the browser to make a new request at the redirect URL. A whole new web request occurs, and none of the code executed before the redirect is retained in memory.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
format.html and redirect_to | 4 | 144 | February 23, 2009 | |
Rails app returning 302 redirects, is that bad? | 1 | 143 | May 17, 2011 | |
redirect 302 then redirect 304 | 0 | 105 | June 6, 2008 | |
redirect_to's and http_accept | 0 | 134 | September 28, 2006 | |
HTTP Redirect Response in Turbo | 0 | 808 | June 30, 2023 |