Following is Google Chrome version for getting parent window's URL from iFrame.
window.location.ancestorOrigins;
I'm looking for equivalent of above statement for FireFox and IE. Is it possible to achieve it.
Tried with document.referrer
also giving the iFrame Url only.
Unfortunately, FireFox and IE do not have an equivalent to ancestorOrigins.
The best you can do with regards to getting the parent URL is document.referrer
and unfortunately if you are dealing with iframes, this means you may not be able to get to the outside page and get the true URL of the webpage.
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