views:

237

answers:

3

Hi everyone,

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.

Thanks in advance!

+3  A: 

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?

Matt
A: 

No, that would be a gigantic security problem.

The traditional SO long answer would be "nooooooooooooooooooooooooooooooo".

Pointy
+1  A: 

No, what if they loaded www.mybankwithterriblesecurity.com/?password=password ?

Alex K.