vi***@kcm.edu.np writes:
Is there a way using javascript (or anything else) to know where the
users go after they leave my page?
Generally not.
Why would you need that?
Like "Do you want to navigate away ..." does a good job of alerting
people no matter how they want to navigate away, clicking on links,
clicking on bookmarks, typing new URLs etc,
That would be the "onunload" event? It's nonstandard, but I guess it works.
can I know where they go when they exit my page?
Only if they follow a link on your page.
The easiest way to achieve it would be changing each link to a redirecting
page. I.e., instead of "http://www.example.com/", the link is
"http://www.mydomain.com/redirect?to=http://www.example.com/" and that
page records the passing user and returns a redirect status (301).
It does slow the browsing down slightly, and people can become very
annoyed at crap like that.
Another, worse, approach is to have each link trigger some javascript
that sends a XMLHttpQuery request and delays the user for long enough
to get it off, e.g., using an onunload annoyance (you don't need the
response anyway).
All in all, stop spying on your users. We don't like it.
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'