【发布时间】:2021-06-11 21:38:06
【问题描述】:
我想使用 HTML iframe 加载另一个页面,但 Firefox 因避免安全问题而阻止了它。 .
我尝试将“https”更改为“http”,但它不起作用。
Firefox 显示的错误:
Firefox Can’t Open This Page
To protect your security, anouar.stencila.io will not allow Firefox to display the page if another site has embedded it. To see this page, you need to open it in a new window.
这是使用的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Reproducible Article</title>
</head>
<body>
<!-- The header of the file -->
<p>
<a
href="https://ojs3.josekarvalho.net/index.php/rp/article/view/87/176"
target="_blank"
>Link to HTML version</a
>
|
<a
href="https://ojs3.josekarvalho.net/index.php/rp/article/view/87/181"
target="_blank"
>Link to PDF version</a
>
</p>
<!-- The iframe to be shown - the link to the reproducible article allowfullscreen -->
<iframe
src="https://anouar.stencila.io/gentsch2020/"
frameborder="0"
style="position: absolute; top: 80px; left: 0; width: 100%; height: 100%"
scrolling="yes"
title="Reproducible Article"
></iframe>
</body>
</html>
【问题讨论】:
-
在手机上,所以无法真正检查,但这听起来确实符合您尝试嵌入的网站发送x-frame-options 标头或类似的防止 iframe 的要求。如果您无法访问他们的后端,您将无能为力。
-
@Kaiido 感谢您的回复,您指的是哪个后端?