Does not allow inverse iframe conversion

Hi, I have iframes on my page, one works fine and the other doesn't work, giving an error since it doesn't allow cross cropping. Sample code below:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org /TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <script type="text/javascript" src="../script/jquery.js"></script> <title>Cancellation Policy</title> </head> <body> <span>Some text goes here.</span> <br /><br /> <iframe src="http://www.w3schools.com/"></iframe> <iframe src="https://www.google.co.in/?gws_rd=cr&ei=-bmBUo24M6npiAeepICYAg"></iframe> </body> </html> 

Any help is very helpful.

+7
source share
2 answers

I think you cannot open a secure site in an iframe. those. those sites that start with https: // cannot be opened in an iframe. You can open w3school.com in an iframe, but not https://twitter.com or https://facebook.com or https://google.com etc.

I made a mistake when trying to open google.co.in in an iframe:

 Load denied by X-Frame-Options: https://www.google.co.in/ does not permit cross-origin framing. 
-2
source

Source: https://habr.com/ru/post/957880/


All Articles