Reputation: 11637
Does anyone know how to (or if it is possible) to get the address bar value after a user tries to navigate to another page from my site?
To be clear, I'm not looking for the value stored in window.location (since this is the page that the user will currently be on), but rather the site that the user is trying to navigate to.
Upvotes: 0
Views: 2114
Reputation: 175748
No, what if they loaded www.mybankwithterriblesecurity.com/?password=password ?
Upvotes: 3
Reputation: 413702
No, that would be a gigantic security problem.
The traditional SO long answer would be "nooooooooooooooooooooooooooooooo".
Upvotes: 1
Reputation: 75307
This isn't possible.
You can of course capture the target URL of a link if the user changes page via hyperlinks in your page, but as far as typing a new URL in the address bar, no. Why, anyway?
Upvotes: 4