Home >Web Front-end >JS Tutorial >Rewriting window.location and determining whether location has been rewritten_javascript skills
Window.lcoation can be rewritten without redirection under IE. The specific method is: var location = {}, and then the specific attributes can be rewritten. This will bring certain risks to determine the location through js.
How to determine whether location has been rewritten? After struggling all afternoon, I came up with a method:
(location==document.location&&location instanceof Location)
This method is only used for IE.