Why does a self-referencing iframe not infinitely loop and crash my machine?

后端 未结 2 1564
星月不相逢
星月不相逢 2020-12-13 08:43

I created a simple HTML page with an iframe whose src attribute references the containing page -- in other words a self-referencing iframe.

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-13 08:57

    I'd like to add a little something to the "Also, why doesn't even IE crash at this?" part of the question. IE does not let us down...

    If you add a simple iteration number as a query string to the nested iFrame's src Firefox and others will just stop after a certain iteration depth. IE - and we tested this with IE version 10 - just crashes :)

    this.php