Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top