0

I have a page from a.com which includes a iframe from b.com and after some manipulation b.com finally redirects iframe back to a.com. So can the page access the current location/src of the iframe?

Regards,

Jishnu

0

1 Answer 1

0

Once the page in the iframe is on a.com, the security restrictions are lifted and you can access the parent page like normal. Security restrictions are updated when the iframe src is changed, even if it is by the iframe itself.

If you need to know when the iframe has finally directed back to a.com, you can have it call a function in the parent document with window.parent.redirected() where redirected() is a function you define in the parent document on a.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.