Alex Rivera | Logout

Change window location Jquery

Asked 2010-09-08T14:57:43.077
21

I am using ajax to load my website content and want to update the window location when ajax is successful.

How can I update the window location to "/newpage"?? I need users to be able to go back and to refresh. Is this possible??

Edit
Report

1 Answer

3

Assuming you want to change the url to another within the same domain, you can use this:

history.pushState('data', '', 'http://www.yourcurrentdomain.com/new/path');
answered 2013-06-17T22:46:48.470

Your Answer