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
2.1m questions
2.1m answers
60 comments
57.0k users