I do not know that is this the perfect forum for the question or not, but as i am implementing it in the JavaScript, i have posted it here.
I am implementing a pop up box when a user leaves a webpage, now what i want to do is to check either the user is going to an other page of the web site or to a different web site.
I want the pop up to occur only when the user leaves a site and not when it is navigating to an other page of the web site.
How can we check to which page a user is navigating in JavaScript, i have tried to check the request headers but could not find a solution.
Thanks in advance.