Windows Internet Explorer 6

Ajaxian » jQuery one-line plugin to crash IE6において、IE6をクラッシュさせるプラグインが紹介されている。IE7やIE8ではクラッシュせず、IE6のみでクラッシュが発生する。紹介されているプラグインはjQuery Crash Plugin。プラグインのソースコードは次のとおり1行だけ。関数を定義しているのみ。

/**
 * jQuery Crash (http://mktgdept.com/jquery-crash)
 * A jQuery plugin to crash IE6.
 *
 * v0.0.2 - 5 March 2010
 *
 * Copyright (c) 2009 Chad Smith (http://twitter.com/chadsmith)
 * Dual licensed under the MIT and GPL licenses.
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.opensource.org/licenses/gpl-license.php
 *
 * Use $.crash();
 *
 **/
;jQuery.crash=function(x){for(x in document.open);};

実行するにはjQuery本体も必要。簡単に試せるようにまとめたHTMLを次に掲載する。表示されるボタンをクリックすると、クラッシュの引き金となる「$.crash();」がコールされるようにしてあり、IE6ではクラッシュが確認できる。

<!DOCTYPE html">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IE6 Crash Demo</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://mktgdept.com/js/jquery-crash.js?v0.0.2"></script>
</head>
<body>
<input type="button" value="Crash" onclick="$.crash();"/>
</body>
</html>

IE6はクラッシュ

IE7はクラッシュしない

IE8はクラッシュしない

Opera 10.52はクラッシュしない

シェアを落とし続けているとはいえ、2010年3月現在のIE6のシェアは18.41% (Net Applications調査)となっており、ブラウザバージョン別にみるとIE8に次いで第2のシェアを保っている。IE6はCSS対応やJavaScript実行の互換性などで問題にあげられることが多く、WebデベロッパやWebデザイナにとって頭の痛い存在になっている。