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?
window.location = '/'
Disadvantage in using window.location.replace('/')
is user won't be able to press "Back" and go back to the previous page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With