Iframe with src attribute receiving an internet link

Asked

Viewed 83 times

1

I am creating an iframe on a page, and in the src attribute, when I define a link any (with http://...), he just won’t open.

For example:

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

This only opens the outline of the iframe box with absolutely nothing inside, looking like it doesn’t accept links in the SRC... How can I do this?

1 answer

2


There are sites that in fact cannot be shown within iframes. That’s why these sites have "turned on" a security option called X-Frame-Options.

That one X-Frame-Options is a header (can be said to be one of the configuration parameters), and tells the browser whether or not it is authorized to display the content of that site in cases where the iframe and the source site are running in different domains.

To official designation of the regulatory authority (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, whether regarding the browser may display the transmitted content in frames that are part of other web pages.

I would translate like this:

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

  • Excellent reply! Thank you!

  • @Programmer nothing. If you want you can mark the answer as accepted.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.