Go to content Go to navigation Go to search

Persuade family and friends away from IE6

August 30th, 2006 by Jake

Ever wish you could persuade family and friends to stop using IE6? Ever wanted to give them a gentle but firm nudge in the right direction? Well now you can.

A web developer posted an exploit on his blog which immediately crashes the IE6 (or 5.5, or 5.0, etc.) engine to the ground. And by crash, I mean Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience. Sound familiar? It’s the dreaded “Guess what? Your app crashed! Now you get to start all over again!” message Windows displays.

The exploit comes when trying to list all properties in JavaScript of document.write. FireFox renders the code perfectly, and IE7 ignores the error (nothing is displayed, but it doesn’t crash), but IE6 and below crash. So, just add this one line of code to any web page, and when their browser crashes, sound confused and helpful… “Oh, that’s strange, the website works fine for me. why don’t you try a different browser, a better browser.” Catch my drift?

Here’s the code… 61 bytes of IE-crashing goodness.

<script>for (x in document.write) { document.write(x);}</script>

4 Responses to “Persuade family and friends away from IE6”

    Tigerblade says:

    and in related news… that guy’s site is down. i’m guessing the digg effect has claimed another victim?


    Jake says:

    It has indeed. ;) It should be back up now, though, give it a try.


    Rangi says:

    By using the nonexistent f(x) instead of document.write(x) and leaving out unnecessary spaces and punctuation, you can cut this down to 45 bytes:

    for(x in document.write)f(x)

    Or if you enter it into the address bar, it can be even shorter (39 bytes):

    javascript:for(x in document.write)f(x)


    Dona Franklin says:

    grlre526vw5w73i4


Leave a Reply: