12 September 2009

Just then, something very mysterious happened.

Earlier today I was working on a website at work that had severe performance issues in Internet Explorer. The site has a healthy amount of Javascript, a significant portion of which was actually written to overcome various bizarre shortcomings of IE6. For example, IE6 doesn't support the ":hover" pseudoclass for any element that isn't a link, which frankly is absurd, because it almost seems deliberately omitted, since somewhere they would have to check if the element was a link or not. Anyways so every page of this site was taking as much as 35 seconds to fully initialize and run all of the startup Javascript code. This, needless to say, was disconcerting for me, and I tried in vain to optimize my code.

Just then, something very mysterious happened. I reloaded the page, blinked, and it was initialized. Everything was fine. I had written some code to time the hardest parts of the Javascript code, and where these were reading 35ish seconds before the entire page was now loading in less than a second—still nowhere near on par with modern browser performance but quite tolerable. I was ecstatic even though by all outward appearances it appeared as though my little Javascripts had been touched by the Flying Spaghetti Monster Himself somehow, and this was a little alarming to me. At this point my surprise turned to incredulity when I checked the changes to my files; there were none. I had added a superfluous semicolon to one function but when I removed the semicolon the performance was the same. The website had unexpectedly made a 7,000% speedup, and I was mighty suspicious of this. I had a colleague confirm it and he couldn't. The site was just as slow as ever on his machine. I was nonplussed, to say the least.

Which brings me to the point of this little entry. Internet Explorer 6 is eightish years old, as obsolete as a program can be when so many people still use it. That number is diminishing rapidly, but Microsoft recently announced they will continue to support it until 2014. This is terrible news for web developers, because IE6 provides what I would generously call an inferiour web experience by today's standards. It's two versions behind now that IE8 is stable, and it's really showing its age. Yet, because so many corporate users have to use IE6 at their job, it's still vital to make sure any website I build works in IE6. I get that. But what if we change what it means for the website to "work"?

Here's what I propose. Every user, no matter what browser they're using from Chrome to IE6 to godforsaken lynx, should be able to read and view all content, but that doesn't necessarily mean that they need to be able to see animations or transition effects or fun stuff like that. It's extremely difficult to get these kinds of things to work well in IE6, and rather than burn up so many man-hours trying to make the experience exactly identical, I believe it would be more beneficial to only assure that IE6 users can view all the content. If the styles are messed up and the website looks terrible, that's obviously a huge problem, but if clicking that photo gallery link opens an iframe instead of fading the page to a lightbox, I don't think that's necessarily the end of the world. In circumstances where you have a browser as inefficient as IE6 is, particularly at manipulating the content of web pages, you have to use a very light touch lest you introduce too much latency. So my idea is to produce the CSS and Javascript in such a way that semantic data is preserved, but the site experience degrades gracefully along with the age of the browser. IE8, Firefox, and Chrome users may get super fancy animated transitions between elements on the page, and various interactive things, but IE6 users will get just the page and its contents, laid out statically to be just as useful if not as delightful.

The moral of this story is that IE6 users have the crappiest browser still in use in the world. Absent real user testing I can't know this but I imagine by now they're accustomed to the web looking strange. Build your site in such a way that it's still usable to IE6 users, even if that means generating a different experience for them. Alright. Time to relax, space cadets; I'll talk to y'all later.