document.referrer : referrer « Document « JavaScript Tutorial






The referrer property contains the URL that was used to reach the current document.

If the URL was typed directly into the browser's location field, this property will be empty.

<html>
    <script language="JavaScript">

    <!--
    document.write("<a href='",document.referrer,"'>Go back</a>");
    -->

    </script>
</html>








14.32.referrer
14.32.1.document.referrer