Locating my iframed site

I know that iframed pages can say that they are , but can it be said where? parent.locationrunning into security issues when the parent is a different domain, as far as I can tell. Any work around?

+5
source share
4 answers

I have not tested, but you should do something like:

if (window.top !== window.self) {
    alert("I am a frame. The parent document is " + document.referrer);
}
+1
source

No, you cannot access the parent window if it is not in the same domain.

0
source

? , , , , .

0

If you want to make an effort, you can write a plugin (for all browsers) or an active x (for ie) to determine this, since they are not blocked from accessing the client computer as much as ect javascript.

0
source

All Articles