Should both of them reference the same object?
I would say window.location is the more reliable way of getting the current URL.
Following is the difference between the window.location and document.url that came in front in one of the scenarios where I was appending hash parameters in the URL and reading it later.
After adding hash parameters in the URL.
In an older browser, I was not able to get the hash parameters from the URL by using document.url, but when I used window.location then I was able to get the hash parameters from the URL.
So it's always better to use window.location.