Refael
Refael

Reputation: 7303

How to get the address that the client type on the Address bar

Is there a way to identify the client typed the page address in the Address bar.
I need this information before the request is sent.
Probably in the event onbeforeunload

Upvotes: 0

Views: 69

Answers (2)

In Javascript, you should be able to get the full URL from document.location, (so var URLstring = document.location; for example).

Upvotes: 0

Quentin
Quentin

Reputation: 943142

Except when the navigation is caused by something in page (e.g. clicking a link) there is no way for the previous page to find out where a user has navigated to.

It would allow for some serious privacy violations if it was possible.

Upvotes: 5

Related Questions