Redirect IE6
Man, having a kid keeps one busy. It's been awhile since I've blogged, but something has been ruminating in my brain recently that I thought I would try out on ye ol' intarwebs. What got me thinking was this post by Dan Cedarholm.
Serving an unstyled version of a site is all well and good, except it doesn't let the IE6 user know how to remedy the problem. Alternatively, I propose that we as developers redirect any incoming IE6 traffic to a unified point.
Rather than give IE6 a diminished user experience, this method would prevent the use from having any interaction with your site at all. That's not to say the IE6 landing page need be rude or condescending.
In fact, quite the contrary. It could politely explain why it is no longer being supported, whilst giving suggestions on how to obtain a better browser, such as a newer version of IE. It could also point them to Chrome, Firefox, Opera, and Safari — all of which are superior to any available version of IE.
Here's the code. Place as first lines in the <head>
…
<!--[if lte IE 6]>
<meta http-equiv="refresh" content="0; url=/ie6.html" />
<script type="text/javascript">
/* <![CDATA[ */
window.top.location = '/ie6.html';
/* ]]> */
</script>
<![endif]-->
Basically, the meta refresh says: "Hey browser, if you are IE6 or any previous versions, go ahead and re-direct yo'self before you wreck yo'self." If for some reason the browser has such redirects disabled, then JavaScript says: "No, seriously - get lost." I'd wager 99.9% of the time this heavy handed approach will work, allowing us to focus on forthcoming IE8 bugs instead!