user1022241
user1022241

Reputation:

Iframe src cross domain

I need to display another website in an iframe. I don't need to access anything on this website I'll be displaying. Is this in violation of the cross domain policy? If so, would a proxy bypass this?

I tried a simply iframe with its src set to http://google.com as a test, and it looks like this does violate this policy. How can I bypass this if I don't need to access anything on the displayed webpage.

Upvotes: 1

Views: 5251

Answers (2)

Francis Lewis
Francis Lewis

Reputation: 8980

No, you can access any site through an iFrame. What is against the policy is trying to manipulate the site in any way and modern browsers won't let you manipulate it anyways.

Google does allow you to get their site through an iFrame, however, they're using code to "break out of frames", so instead of viewing their site through an iFrame, you'll just be redirected to google.com

Upvotes: 2

user1022241
user1022241

Reputation:

Ah, I see now that its only the test page I used, google, that forbids this. Other sites are OK.

Upvotes: 0

Related Questions