Iframe with src attribute receiving an internet link

1

I'm creating an iframe on a page, and in the src attribute, when I make a link (with link .), it just does not open.

For example:

<iframe src="http://www.google.com"></iframe>

This opens only the iframe's box boundary with absolutely nothing in it, it seems like it does not accept links in SRC ... How can I do this?

    
asked by anonymous 29.05.2016 / 04:42

1 answer

2

There are sites that in fact can not be shown inside iframes. This is because these sites have "turned on" a security option called X-Frame-Options .

This X-Frame-Options is a header (you can say this) if it is one of the configuration parameters), and tells the Browser whether or not he is authorized to display the contents of that site in cases where the iframe and the source site are running in different domains.

The official ruling of the regulatory body (RFC7034) is:

  

To improve the protection of web applications against clickjacking ,      this document describes the X-Frame-Options HTTP header field, which      declares a policy, communicated from the server to the client      browser, if the browser may display the transmitted      content in frames that are part of other web pages.

I would translate this:

  

To improve the protection of web applications against clickjacking ,      the document informs the HTTP header X-Frame-Options , which      declares a policy or rule, communicated from the server to the client, about whether the browser can display the content in elements <frame> , <iframe> or <object> inserted in other web pages.

    
29.05.2016 / 08:16