Yes, there is a difference. window.location is a Location object. window.location.href is a string representation of the location. The Location value of the toString() object is the same as the href property, so they are identical if they are used as strings. The window.location setting window.location same as the window.location.href setting.
window.location , however, has several other properties that you can use, such as location.hostname , location.pathname and location.hash . That way you could set location.hash yourself to change the hash value.
source share