Upload Facebook to iframe

I cannot load facebook in an iframe on a webpage, for example the following:

<html> <head> <!-- some stuffs here --> </head> <body> <!-- some stuffs here --> <iframe src="http://www.google.com" frameborder="0"> </iframe> </body> </html> 

I tested it on other sites and it seems to have downloaded without problems, for example, for wired.com , but not for facebook.com ...

Can someone explain to me why?

I use Google Chrome and Safari, if necessary.

It seems that Google is blocking the loading of its iframe page.

+8
html iframe
source share
3 answers

If you use the Firebug or Google Chrome Developer Console, you may see the following error

 Refused to display document because display forbidden by X-Frame-Options. 


X-frame-options

DENY
The page cannot be displayed in the frame, regardless of which site is trying to do this.

SAMEORIGIN
A page can only be displayed in a frame in the same place as the page itself.

Here is another stackoverflow related question. Overcoming "Displaying Prohibited Using X-Frame-Options"

+14
source share

Google and Facebook use the X-Frame-Options in the HTTP response header to avoid loading content into the iFrame.

The X-Frame-Options HTTP response header can be used to indicate whether the browser is allowed to display the page in or. Sites can use this to avoid clickjacking attacks, ensuring that their content is not embedded in other sites.

Source: https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header

I do not think you can override this parameter.

+5
source share

use the "ignore X-frame-option" plugin for Google Chrome

-3
source share

All Articles