In IE, window.lcoation can be rewritten without redirection. The specific method is: var location = {}, and then the specific attributes can be rewritten, which will bring certain risks to judging location through js.
How to determine whether the location has been rewritten? After a whole afternoon, I tried a way out:
(location==document.location&&location instanceof Location)
This method is only used in IE.