Search w3schools.com:

SHARE THIS PAGE

Document referrer Property

Document Object Reference Document Object

Definition and Usage

The referrer property returns the URL of the document that loaded the current document.

Syntax

document.referrer


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The referrer property is supported in all major browsers.


Example

Example

Return the referrer of the current document:

<html>
<body>

The referrer of this document is:
<script>
document.write(document.referrer);
</script>

</body>
</html>

Try it yourself »


Document Object Reference Document Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]