Reputation: 19831
I know that iframed pages can tell that they are, but is it possible to tell where? parent.location
runs into security issues when parent is a different domain, as far as I can tell. Any work arounds?
Upvotes: 5
Views: 188
Reputation: 25607
I haven’t tested, but you should be able to do something like:
if (window.top !== window.self) {
alert("I am a frame. The parent document is " + document.referrer);
}
Upvotes: 1
Reputation: 31738
If you wanted to put the effort in, you could write a plugin(for all browsers) or active x(for ie) to determine this as they are not blocked from accessing the clients computer as much as javascript ect.
Upvotes: 0
Reputation: 1742
Wouldn't it show up in your server logs as the referrer? I know that's not a programmatic way, but i'm wondering if you're just trying to track down people stealing your content.
Upvotes: 0
Reputation: 110892
No you can't access the parent window if its not on the same domain.
Upvotes: 0