I need to redirect in a javascript file to a given URI specified by the user.
So a quick example how I do this:
function redirect(uri) { if(navigat
I would suggest :
location.assign('someUrl');
It's a better solution as it keeps history of the original document, so you can navigate to the previous webpage using back-button or history.back() as explained here.