I am confused as to the difference between window.location and location.href. Both appear to be acting in the same way.
window.location
location.href
What is the differe
window.location has other properties aside from href but if you assign window.location a URL it will redirect.
href
You can see all of its properties in MDN (like search, protocol, hash, ...)
search
protocol
hash