I want to show alert when user is leaving our website within same tab of the browser. I searched and found unload
event, which triggers each time both when user is leaving or clicking our website link.
For example I'm at abc.com I must not got alert box when I'm clicking my site links. But I must got alert box when I'm writing xyz.com in address bar.