I’m a convert. I used to be a die-hard IE user. I even stuck to my guns for a long time before switching from IE6 to IE7 (I’m not using tabbed browsing if FireFox invented it). But, as I moved to a new company and started working on a consumer-oriented site (the majority of which still use IE) but with html and Ajax (don’t get me started on Microsoft’s server-side Web strategy, 3.5 and Ajax.net be damned) I really wasn’t interested in using Microsoft for anything. Of course, it’s what I know so I ended up grudgingly building the site in .Net (originally sticking with 2.0 but upping it to 3.5 to support some .Net controls).
So, I’m doing my best here to balance the best of both worlds. I’m using master pages (they are pretty sweet) but not using server-side controls (except for Telerik) if I can help it.
In order to get from point A to B without having to invent it all again, I decided to use the jQuery JS library. It’s a great library and gets better with age. When you use a single line of code to update an entire layout or use it for XML (as some stalwarts like to point out, it’s not an XML parser but dammit, it’s an HTML parser so guess what? They’re related.), you’ll be sold.
I upgraded recently, or rather, started an upgrade, to a new version, 1.3 so I could get some speed benefits but also so I could use v1.6rc5 of the UI plugin. That sucker’s got some beautiful controls (and they’re not server-side!!). Thing is, after happy tapping out a dialog form and testing it out (successfully) in FireFox 3, that little storm cloud on my shoulder that warns me of coming dangers whispered, “Try it in IE…” I said, naw, but then it struck me with lightning so I tried it.
“Invalid argument. Line 23,102,203 of your huge codebase.” Another informational Microsoft alert.
I put it through the debugger which wasn’t much help. Oh, I found the code where the error was but it was a normal bit of code that worked for everything else. After much banging against many walls, I finally decide to post to the Google groups for the UI development. I hate posting there because Google seems to offer up a way for people to get your e-mail address (really? Do ya have to?) that, despite a reCaptcha gate still resulted in me getting tons of spam on a gmail account I NEVER use for anything else. I’m so glad my paranoia told me to use that address rather than my main account.
Anyhow, as I’m going through this long drawn out affair of describing the issue and throwing blocks of HTML, CSS, and JS up there I just happen to write, “I’m using the XHTML 1.1 dtd on this site.” Gotta love me being thorough. I say, what if I switch it to 1.0 transitional?
I do and BAM, it works just fine. In fact, the original issue that made this come up (the dialog was all of 20 pixels high despite a declaration of 500px high in the JS) was also gone.
Then I remembered. IE7 may be MORE modern than IE6 (can you believe 25% of people out there browsing now still use that old piece of crap that shipped with Windows Me and 2000?) but it’s definitely not up with the standards. FF3 is. And, IE8 is supposed to be (downloaded that sucker but I want to set up a VM slice to try it out…) but that’s still a little ways off (I used to install beta software left and right and still do but with MIcrosoft, I’ve taken a new approach: I wait for at least 3 months if not 6 months and if that SP you know is going to come out is announced, I might even wait for that). Microsoft’s beta testing program (read: product launches) has gotten out of hand.
So, though I must support IE7 (and the fact that they released that sucker with Vista means it’s not going anywhere until Vista’s lifecycle is done in five or more years), I do so with the utmost scorn. Sure, I still use IE7 for personal use (it’s still my default…FF3 takes too long to load thanks to Microsoft, I’m sure) but when I want a stable browser to browse with (did I mention my IE7 crashes and hangs randomly now?) I’m sticking with FF3. That new engine is super fast and it supports something Microsoft throws in as a bonus: standards!
What’s the lesson today? The lesson is, when you’re hammering your head against your desk because some CSS or JS isn’t working right in IE7 or 6, consider using the transitional dtd with them. You might solve all your problems with a single DOCTYPE declaration!
kn