简体   繁体   中英

how to get redirecting page url using javascript

I want to get a url of the page where user is going after reaching to my webpage. Let say user just came to my website page xyz and now he entered the another url abc on the browser bar. So now i want to get a link of abc using jquery or javascript. Is it possible?

Because it can't be done. The new location is private/sensitive information. Nobody wants you to know which sites they visit when they leave your site.

How can i get the destination url in javascript onbeforeunload event?

But if you want to do something before unload than you can get help from below link.

jquery beforeunload does not display message

You got help from this

$(window).on('unload', function(){
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM