views:

302

answers:

1

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?

+1  A: 

window.location = "/"

Disadvantage in using window.location.replace("/") is user won't be able to press "Back" and go back to the previous page.

+1 for disadvantage
N 1.1