Why are Server Side Redirects implemented the way they are?


using the redirect() function on the action context's http addon does not work the way one would expect, it does not redirect at all, because the 301 statusCode is overriden in ac.done()

I would expect that calling ac.http.redirect(url) would result in the following actions: 1. In the spirit of making Express a first class citizen in the Mojito world, immediately call res.redirect() 2. Cleanup the ac, by calling ac.abort() 2.a. ac.abort() clears the _timer 2.b. Calls mojito hooks ('abort', 'end2') etc.

This would allow a single-page app to move to a different page in an ordered manner.

Thanks, Ron

1 Reply
  • @Roland, we can revisit that. feel free to open an issue thru Github:


    We are working to bring express to the front row, so you can do the things that you normally do in express without having to go thru the mojito internals, that's part of the mojito-next initiative.


Recent Posts

in Yahoo! Mojito