Simple javascript script to crash browsers 01-27-2016, 03:09 AM
#1
Code:
var total = "";
for( var i = 0; i < 100000; i++ ) {
total = total + i.toString();
history.pushState(0,0, total );
}I think a lot of people know about this already, but it's pretty crazy how simple but deadly this is. I'm surprised major browsers like Chrome haven't done anything to prevent this yet. This basically saves the current page state (each state request is around 1mb I think) then that x100000 is equal to like 25ish gbs of ram the pages uses up. I'd think Chrome would block an individual tab from using this much ram but apparently not. This won't cause any major damage but it definitely will lag/crash your browser if you keep it open for too long.
This code also has the ability to crash iPhones (sort of like the effective power glitch) and reboot.



![[Image: aWZ0A28.gif]](http://i.imgur.com/aWZ0A28.gif)
![[+]](https://sinister.li/images/modern/collapse_collapsed.png)











