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?
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);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With