gpt4 book ai didi

Firefox 不加载 iframe 内容

转载 作者:行者123 更新时间:2023-12-02 03:20:43 25 4
gpt4 key购买 nike

我在 http://localhost/page1 有一个页面在该页面上,我显示了 http://localhost/page2某些 div 中 iframe 中的内容。

它在 chrome 中运行良好。但是在 firefox 中,page2 没有显示。
我在 Firefox 控制台中没有收到任何警告/错误。

因为这两个页面具有相同的域。 firefox 应该正确加载 page2 iframe

我是否遗漏了一些明显的东西?

最佳答案

它故意加载一个空的 iframe。这发生在 Firefox 中以防止无限递归。

根据 W3C 框架规范:

Infinite recursion is prevented. Any frame that attempts to assign as its SRC a URL used by any of its ancestors is treated as if it has no SRC URL at all (basically a blank frame). This doesn't prevent all malicious documents, but it eliminates a troublesome class of them.

请参阅随附的 stackoverflow 文章 - 这是我找到答案的地方。

Infinite recursion

关于Firefox 不加载 iframe 内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33640783/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com