Check Referer

A security script that checks the URL the surfer came to to arrive to the current page. If its not the specified URL, the surfer is denied access. Use this script if you wish to allow surfers to enter a page only through a predetermined previous page.

<script>
<!--
var previousurl="http://www.example.com/index.html"
if (document.referrer!=previousurl)
{history.go(-1)
alert("Access Denied!")
}
//-->
</script>

referer javascript security


Back To Top
© 1998 - 2024 psacake.com
Version 7.21 | Advertise on this site