BB.Net / ramblings / posts / setInterval and setTimeout

What I learned today: setInterval is not the same as setTimeout. It seems you can still easily forkbomb firefox with some trivial JS code.

<html>

Ran <span id="num">0</span> times

<script>
var f = function()
{
    var e = document.getElementById("num");
    e.innerHTML++;
    setInterval(f, 100);
}
f();
</script>

</html>

download file "/crash.html"