I am trying to open a https website from a html iframe but I am not able to do so. The code I am using is -<iframe style="min-height:98vh" src="https://www.google.com" width="100%"></iframe>
How can I do this?
I am trying to open a https website from a html iframe but I am not able to do so. The code I am using is -<iframe style="min-height:98vh" src="https://www.google.com" width="100%"></iframe>
How can I do this?
If you want to open a site that is over 'https', you can use it like the code below.
<!DOCTYPE html>
<html>
<body>
<h2>HTML Iframes</h2>
<p>You can also use the CSS height and width properties to specify the size of the iframe:</p>
<iframe src="https://www.kuflink.com" style="height:250px;width:100%"></iframe>
<iframe src="https://www.flipkart.com" style="height:250px;width:100%"></iframe>
</body>
</html>
Now if you can see the first site is loaded into an iFrame, even if it is with https but the second one gets a connection refused. even if you try w3schools in an iframe it will do the same. You can inspect your code and post the error that you are getting. This I think will be of X-frame options. You can read furthermore here for X-Frame-Options