Assuming you have this url : http://www.domain.com////// . How is possible to change the uri path , by seting only the relative path (window.location = ‘home’) not the absolute one ( window.location = ‘http://www.domain.com/home’) . If you assing to location.href a relative path , the above url would be http://www.domain.com/////home . I want http://www.domain.com/home
Assuming you have this url : http://www.domain.com////// . How is possible to change the
Share
Try this:
Setting the URL to a string starting with “/” goes back to the “root” level, so right after the host address. Using “../” you can go back single levels, like navigating through a filesystem.