3 Solutions for Supporting Internet Explorer
In the beginning, Internet Explorer was the progressive browser. After a period of inactivity, Internet Explorer became the bane of our existence. Microsoft has since recommitted to their browser but the fact remains that sometimes modern Internet Explorer is lagging just a bit behind WebKit-based browsers and Firefox. We also need to accommodate for earlier versions of IE. The following will allow your sites to quickly and almost magically work better in Microsoft's flagship browser!
<!--[if lt IE 9]> <script src="dist/html5shiv.js"></script> <![endif]-->
Selectivizr.js is an incredible resource, polyfilling loads of unsupported CSS selectors and properties, including the all-important
last-child. On a recent redesign, I was able to plug selectivizr in and not miss a beat in older Internet Explorers. Here's how I implemented it:
<!--[if lte IE 8]><script src="js/libs/selectivizr.js"></script><![endif]-->
An absolute must for your modern projects. Only loaded for old IE's
<html> Conditional Comments
The ugliest conditional comment series you'll ever see. Ever. But ugly or not, the fact remains that this code workers exactly as intended:
<!DOCTYPE html> <!--[if lt IE 7 ]> <html class="ie6" lang="en"> <![endif]--> <!--[if IE 7 ]> <html class="ie7" lang="en"> <![endif]--> <!--[if IE 8 ]> <html class="ie8" lang="en"> <![endif]--> <!--[if IE 9 ]> <html class="ie9" lang="en"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
While Internet Explorer is catching up to its competitors, the fact remains that their old browsers are still relatively popular, especially in developing countries. The good news is that these resources work in all of those browsers and are not expensive in modern browsers!
I vote to let IE die on it’s own and take it off these life support hacks. If Microsoft can’t fix the problems and they don’t let anyone else fix the problems by leaving the code base closed then why should we help keep this zombie browser wondering the Internet.