document.location vs document.location.replace

Posted in Programming at 2:38 pm by Toby


seems to replace (!) the contents of the window, and although it replaces the url in the address bar it doesnt really refresh the page as you will notice if you try the back button as it will look like you are going two pages back.

document.location = ‘http://mysite.example.com/myurl.html’

will go to the new location.

Comments are closed.