Can I get the URL where the User want's to go ?

31 views
Skip to first unread message

Dominic Warzok

unread,
Dec 18, 2012, 4:52:22 AM12/18/12
to google-we...@googlegroups.com
Hi all, 

I'm looking for a while now to find a method which gives me the URL the USer typed in. 

For example: the user is on my webpage www.xyz.com/www/mysite.html  and now he types in the browser bar www.google.de and hit enter. 

It is possible to get the new url in my webapp? 


Thanks in advance 

Dominic 

Philippe Lhoste

unread,
Dec 20, 2012, 8:43:56 AM12/20/12
to Google-We...@googlegroups.com
On 18/12/2012 10:52, Dominic Warzok wrote:
> I'm looking for a while now to find a method which gives me the URL the USer typed in.
>
> For example: the user is on my webpage www.xyz.com/www/mysite.html and now he types in
> the browser bar www.google.de and hit enter.
>
> It is possible to get the new url in my webapp?

AFAIK, no. (Unless, perhaps, you write a specific browser plugin!)
After all, as soon as the user hits Return, the browser no longer has to deal with the
current page, and has no reason to notify it of the change.
At best, depending on browsers, you can be notified of a page leave, but some browsers
deactivated the feature (to avoid pop-unders and similar annoyances).

Note: I am happy such information isn't available to a page, it would be a breach of privacy!

--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply all
Reply to author
Forward
0 new messages