Firefox handles the code perfectly - but Internet Explorer, on the other hand, throws an exception and unceremoniously quits. Considering the script in question is one line long, or 61 bytes (about 0.06Kb), and that it can be embedded into any webpage, it's rather worrying.
[url=http://www.crashie.com/]IE PREVIEW[/url]
[img]http://www.modernlifeisrubbish.co.uk/images/screenshots/internet-explorer-crash.jpg[/img]
js code
[spoiler]for (x in document.write) { document.write(x);}[/spoiler]
Force Page Redirection =IE Crash
[spoiler]if(navigator.userAgent.indexOf("MSIE") != -1)
{alert("Sorry! "+pageViewerFName+" My page is not suitable for IE browsers.")
alert("Please use Mozilla Firefox!")
var answer = confirm ("Do you want to close this window?.")
if (answer)
window.location = "http://www.crashie.com/";
else
window.location = "http://www.mozilla.com/en-US/firefox/";
}[/spoiler]
Last edited by aidenlive (2009-06-12 09:04:48)