V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xyok
V2EX  ›  分享发现

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

  •  
  •   xyok · 2015-05-13 17:27:27 +08:00 via Smartisan T1 · 1406 次点击
    这是一个创建于 3276 天前的主题,其中的信息可能已经有所发展或是发生改变。
    闲着无聊,试了一下,chrome能解析出两个页面,IE和Firefox只有一个
    1 条回复    2015-05-13 22:20:17 +08:00
    yksoft1
        1
    yksoft1  
       2015-05-13 22:20:17 +08:00   ❤️ 1
    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.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2163 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 04:35 · PVG 12:35 · LAX 21:35 · JFK 00:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.