I am not able to get previous page URL using "referrer". Suppose I am going from page A to B. And by clicking browser back button I am returning back to Page A again. Now I want to check my previous page URL is B. How can I check it with Javascript. I have to check this on page load. When returning back to Page A, I did not any value.
<script>
window.onload = function(){
alert('hit '+document.referrer);
}
</script>
Thanks in advance.