Norbert Tamas
Norbert Tamas

Reputation: 4694

Is it possible to get the referrer of an iFrame's parent page with JavaScript in iFrame?

Is it possible to get the referrer of an iFrame's parent page with JavaScript in iFrame?

Example: Page A has an iFrame. The iFrames referrer is be page A. But is is possible to get Page A's referrer in the iFrame with JavaScript?

Upvotes: 7

Views: 15992

Answers (1)

Anthony
Anthony

Reputation: 492

This should be:

parent.document.referrer

Anything in the window that creates the iframe should be accessible through the parent scope.

Upvotes: 9

Related Questions