You have been referred to this item:

Correct Usage of the location Object

location is a property of window, not document.

One can reload a window via location.reload(); or navigate to a new URL via location.href = 'newpage.html';.

Note: The reason one can use location without window is because window is the default scope in an HTML document.