Yesterday I made a post regarding that fakap IE6. Which is Web-Developers worst nightmares on earth. My nightmare. IE6 is the dying old man which refuses to retire. So I wrote a little script to force users to upgrade whenever they view the library portal.
However, after looking at the log files and google anal. report, I soon realize that forcing users to upgrade their browser is mean. So mean, to the extend that some users still stump upon the upgrade warning. (lol. they still asked me what to do). I do so believe the warning is so direct. Why some users still don’t get it.
Some users may not upgrade to the latest IE due to unlicensed copy of Windows (stop using pirated windows ler). Some users may not install alternative browsers due to Company Restrictions (what company is that… so evil). Due to this I will have to lift the force upgrade script.
So… once again hacks and workaround will do the trick. All this started with CSS compatibility issues. Some elements may not appear in IE6 and some element will break the page in IE6. Sometimes I will have to forget the beautiful effect and design since in IE6 the page will break. What a nuisance.
After searching for solutions how to these pages at least viewable in IE6 I come across the conditional codes. Hmm. Created by Microsoft for Internet Explorers.
One of the most common operations performed in a Web page is to detect the browser type and version. Browser detection is performed to ensure that the content presented to the browser is compatible and renders correctly. The browser type can be detected using many different techniques. Most methods of browser detection make use of script on the server or client.
This article introduces conditional comments, which offer certain advantages over scripted browser detection techniques. Conditional comments make it easy for developers to take advantage of the enhanced features offered by Microsoft Internet Explorer 5 and later versions, while writing pages that downgrade gracefully in less-capable browsers or display correctly in browsers other than Windows Internet Explorer. Conditional comments are the preferred means of differentiating Cascading Style Sheets (CSS) rules intended for specific versions of Internet Explorer.
Source : msdn.microsoft.com
After some reading I use these stupid IE codes
<!--[if lte IE 6 ]><div id="bodoh"><![endif]--> <!--[if gte IE 7 ]><div id="panes"><![endif]--> <!--[if !IE]>--><div id="panes"><!--<![endif]-->
These codes will load specific line based on users’ browsers as explained in the links. I hate IE.