I'm now redirecting to main page in my Rails application using
redirect_to root_path
I want to do the same in jQuery.
i.e. window.location.replace("???");
How to do that?
I'm now redirecting to main page in my Rails application using
redirect_to root_path
I want to do the same in jQuery.
i.e. window.location.replace("???");
How to do that?
Share Improve this question edited Sep 18, 2014 at 9:45 sgi asked Mar 10, 2010 at 12:12 sgisgi 2,0326 gold badges21 silver badges28 bronze badges1 Answer
Reset to default 16window.location = '/'
Disadvantage in using window.location.replace('/')
is user won't be able to press "Back" and go back to the previous page.