What is the difference between document.location.href and document.location?
document.location is a synonym for window.location that has been deprecated for almost as long as JavaScript has existed. Don’t use it. location is a structured object, with properties corresponding to the parts of the URL. location.href is the whole URL in a single string. Assigning a string to either is defined to cause the same kind of navigation, so take your … Read more