Should both of them reference the same object?
According to the W3C, they are the same. In reality, for cross browser safety, you should use window.location rather than document.location.
window.location
document.location
See: http://www.w3.org/TR/html/browsers.html#dom-location
1.4m articles
1.4m replys
5 comments
57.0k users