window.location.replace() does not replace, but adds to url

window.location.replace(newurl.com) does not replace currenturl.com with newurl.com, but adds to newurl.com to currenturl.com. So it becomes currenurl.com/newurl.com

Read more here: window.location.replace() does not replace, but adds to url

Leave a Reply

Your email address will not be published. Required fields are marked *