JavaScript onunload Pause
There is a piece of JavaScript that essentially acts like a pausing function, that is a well known piece of code that allows something to be executed. For example, if you had a web app that needed to stop a page from exiting for a a few milliseconds to allow something to record - like an outclick system, you would need the script to pause the page to allow that to register.
But, you could use that code to potentially break a user's browser for a period of time - in some cases like Firefox the browser does tend to stop responding before it catches and asks if you want to halt the script. This can be done from adding as little as [source]:
var date = new Date();
var curDate = null;
do{
curDate = new Date();
}
while(curDate-date < 20000);
...to the "onunload" event on an element in a web page. I really think stuff like this could be more than an annoyance, and it doesn't really sit right with me that this basically freezes up Firefox until the "stop script" or "continue" dialog popped up.
Chrome Google obeyed the script, and lo-and-behold waited for 20 seconds - and didn't ask if I wanted to stop it. Safari asked if I wanted to stop it after a few seconds.
Perhaps it's not as annoying as the way you used to be able to break the back button in IE, but this still seems really iffy as you could keep the user on a page against their will.
Food for thought :-)
sos un cabeza man!