HTML 嵌入 iframe,并在 iframe 中引用自己,为什么没有循环递归出现

2015-05-13 17:27:27 +08:00
 xyok
闲着无聊,试了一下,chrome能解析出两个页面,IE和Firefox只有一个
1421 次点击
所在节点    分享发现
1 条回复
yksoft1
2015-05-13 22:20:17 +08:00
http://www.w3.org/TR/WD-frames-970331
Infinite Recursion

It is possible to design a FRAMESET that recurses infinitely, stacking the same FRAMESET inside itself until a machine runs out of memory. Consider this example:

<FRAMESET rows="50%,50%">
<FRAME src="parent_url">
<FRAME>
</FRAMESET>

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.

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/190809

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX