Why is Chrome redirecting to iframe onload url?

I have a div with an iframe in it, and the iframe loads the page from another site (cross-domain). When a page loads in firefox, it works fine and displays a page with an iframe in a div. However, in Chrome, it automatically redirects the iframe URL when the page loads. Any idea why this is happening, and if it is possible to do what I'm trying to do in Chrome?

Notes. I am not trying to perform cross-domain communication, I just want users to be able to access another site from one page on my site. This also happens in Safari, so maybe this is a webkit thing.

+5
source share
1 answer

iframe . Safari, Chrome, Firefox 1. :

<iframe sandbox="allow-forms allow-same-origin allow-scripts" src="http://stackoverflow.com"></iframe>

allow-top-navigation, iframe . W3C.org.


1 17, Firefox iframe .

+8

All Articles