+ 19
iframe is not working ,show an error,why?
Refused to display 'https://www.google.com/ in a frame because it set X-Frame-Options' to 'sameorigin. Line: 1 is showing on console window ,what is this?
11 Answers
+ 3
Here are some of Google's response headers (from the webserver) when I initially connect:
Date: Sun, 24 Jun 2018 04:59:52 GMT
X-Frame-Options: SAMEORIGIN
Content-Type: text/html; charset=UTF-8
X-Final-Url: https://www.google.com/
Expires: Sun, 24 Jun 2018 04:59:52 GMT
The header causing the problem is: "X-Frame-Options: SAMEORIGIN".
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
From the article, Google may be trying to ensure their content "is not embedded into other sites", which is (among other reasons) a protection against clickjacking.
https://en.m.wikipedia.org/wiki/Clickjacking
+ 9
it works for me:
Check out this:
https://code.sololearn.com/WtV7rvY8TJyl/?ref=app
+ 7
đ„any solutions?
+ 7
hyperlink to the iframe source as an alternative but keep your iframe in place until server is up
standard <a href
+ 5
so what is the meta tag for the web page , please explain đ
+ 4
normally if the server refuses iframe displays, you can't access it
+ 3
well, you need to ask yourself why would i need a iframe that shows googleâs frontpage. Because of that, google blocks it because now you could pretent your google if you put the iframe on fullscreen. But, there is a way around it! use a proxy and it will work ;)
Itâs not the best way to do it though xD
+ 2
iframe is not further supported in HTML5.
+ 1
it is still valid if you use iframe in html5, though some things are not supported anymore in html5. to make it even better, they added somethings to the iframe to make it more secure like âsandboxâ and they added a useful option called âseamlessâ.
If you would like an alternative you could use âobjectâ wich is a html attribute. Its not made to do stuff like external content, but it works though xD
+ 1
Kirk Schafer which is actually odd because for years they and their development team have shown and even given instructions in how to embed their products into websites...