The problem with using location.href is that it will only give you a copy of the current document, which is not always the whole window (if you are in a frameset, for example).
If you are in a frameset, you want the whole thing, so you'd use top.location. If you only wanted the current document, then document.location (or location.href) would be fine.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.