Source: http://user.qzone.qq.com/31584 (QQ space)
Http:// B .qzone.qq.com/cgi-bin/blognew/blog_output_data? Uin = 31584 & blogid = 1272586999 & styledm = Hangzhou & imtpd = qzs.qq.com & BDM = B .qzone.qq.com & mode = 2 & numperpage = 15 & blogseed = 0.4883219253852848 & property = Gore & timestamp = 1273107214 (actual website)
In the past, the shortest ie determination was developed by virtue of the feature that IE does not support vertical tabs.
VaR IE = ! + " \ V1 " ;
Only 7 bytes! See this articleArticle, 32 bytes, ehr... 9, ehr... 7 !!! To know if your browser is IE, describes how foreigners reduce IE's judgment from 32 bytes to 7 bytes step by step! Story
But this record was broken by a Russian in January 8 this year, and now it only takes 6 bytes! It makes use of the difference between IE and the standard browser in handling the tostring method of arrays. For the standard browser, if the last character in the array is a comma, The JS engine will automatically remove it.
VaR IE = ! - [ 1 ,];
Instance:
<SCRIPT>
VaR IE = ! - [ 1 ,];
Alert (IE );
</SCRIPT>
If we judge from the Perspective of Non-ie, we can save a bit, because when we are compatible, most of the cases are IE and non-ie.
VaR Notie = - [ 1 ,];
Instance:
<SCRIPT>
If ( - [ 1 ,]) {
Alert ( " This is not Internet Explorer! " );
} Else {
Alert ( " This is IE browser! " );
}
</SCRIPT>