-1

The following works for some websites, such as bbc.co.uk, but changing them to Facebook or Google for example and nothing is returned - is there a work around?

iFrame method

<iframe src="http://www.bbc.co.uk/" name="iframe_a">
<p>Your browser does not support iframes.</p>
</iframe>

<a href="http://www.bbc.co.uk/" target="iframe_a">BBC.co.uk</a>

object method

<object data=http://www.bbc.co.uk width="1024" height="768"> 

<embed src=http://www.bbc.co.uk
Error: Embedded data could not be displayed. 
</object>

Thanks!

user2912230
  • 79
  • 3
  • 12
  • 1
    Google, and probably Facebook, emits a header that prevents a browser from displaying their content in an iFrame. There's probably no work-around. –  Jun 08 '14 at 08:14
  • possible duplicate of [Overcoming "Display forbidden by X-Frame-Options"](http://stackoverflow.com/questions/6666423/overcoming-display-forbidden-by-x-frame-options) – JJJ Jun 08 '14 at 08:15

1 Answers1

1

It's depends. If the website allows you to embed their content on your site, you can do it, if not it becomes more complicated and I'm not saying you can't, but you shouldn't. If they do not wish to get iframed "working around" it may not be in your best interest.

You can, by the way find out if your website gets iframed and even break out of the iframe and do things, read things, send things around in the context of the website embedding you.

Do you really want to disrespect the understandable and clearly indicated wish of people not to get iframed on your website who are fully aware of that fact?

(especially if their name is google and facebook, both notorious for employing only the smartest polymaths who walk planet earth, and where one knows everything about everyone and the other knows everything about everything)

Winchestro
  • 2,138
  • 14
  • 18