. Advertisement .
..3..
. Advertisement .
..4..
The error
Refused to display 'https://accounts.google.com/o/openid2/auth
?openid.ns=http://specs.openid.ne…tp://axschema.org/namePerson
/last&openid.ax.required=email,name,first,last'
in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
occurred when I develop a website that’s designed to be responsive, so that users can access it via their smartphones. I’ve tried to fix it for some days but have not resolved it yet. Can someone suggest a relevant solution to fix the: in a frame because it set ‘x-frame-options’ to ‘sameorigin’ issue? Much appreciate your support.
The cause:
In this case, they have set the header to SAMEORIGIN, it indicates that they don’t permit the resource to load in an iframe outside of their domain. As a result, this iframe is unable to show cross-domain content. This is the reason why you get: ”in a frame because it set ‘x-frame-options’ to ‘sameorigin’” error.
Solution:
The place in your apache and in other service which you are using must be match.
If apache is being used then in httpd.conf file.
Or you can add
&output=embed
at the end of your url before you post to the Google URL. This also can solve your problem effectively.I came up with a better solution. Maybe it can be used to replace
"watch?v="
with"v/"
, and it will work