This is for when the page containing the iframe is on a different domain.

For example, when loading this page in an iframe ( http://bleacherreport.com/articles/1707335-5-green-bay-packer-players-who-will-surprise-in-training-camp ), the slideshow buttons will no longer work and comments will not show because the JS won't load. I've seen sites like StumbleUpon get around issues like this. How can this be achieved?

有帮助吗?

解决方案

I ended up finding a simple solution.

Add allow-same-origin to the sandbox attribute of the iframe tag.

I have no idea why this works because they are different origins, but this allows the slideshow and comments to show up on bleacherreport, yahoo, and many other articles where it wouldn't before.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top