31 March 2005

The Browser the Way You Want It

I’m in awe of Dean Edwards’ IE7, considered by many to be the CSS rosetta stone for Microsoft Internet Explorer (MSIE), which also still happens to be the most widely used web browser on the planet. For the long-frustrated web developer the allure is obvious: Link to IE7 from within your standards-friendly page and <BAM!> modern CSS compliance par excellence. What more could you want?

(Glad you asked!)

What’s next for IE7? Will it continue to occupy a relatively small (albeit well-respected) niche? Or will it gain enough critical mass to actually level-set the CSS landscape on a broader scale? (You Malcolm Gladwell fans know what I’m talking about.)

Chew On This

First Peter-Paul Koch then, more recently, Dean Edwards put forth that Microsoft can’t “get it right” (meaning CSS) because the MSIE rendering engine, Trident, is already sunk. Consulting my Magic 8-Ball® at this very moment, it weighs in with “Outlook not so good.” (Wow, what are the odds?)

So while on one hand I’m enthusiastically rooting for Chris Wilson and the entire MSIE7 team to fill the CSS bill (preferably the whole nine yards), between my spidey sense and all the recent disheartening news and speculation on the fate of MSIE7 vis-a-vis CSS, I can’t help but have my concerns … and I know I’m not alone. Meanwhile, there’s Dean’s IE7 which, despite being in alpha release and having its very own list of caveats, has garnered praise aplenty.

From the web developer’s vantage point, IE7 has reached a lofty plateau and limited use, while the king of the browsers continues to dodge (and burn <groan>) the standards-enlightened. All I know is, one way or another, we’ve got to evolve past partial CSS1/CSS2.1 as the lowest common denominator. So if you consider that Dean has already hit a triple, I say it’s time to try knocking that ball clear out of the park. Perhaps if we changed the rules of engagement:

Rewrite IE7 as a Windows Browser Helper Object.

That Dog Don’t Hunt

Now before y’all go thin-slicing, I’ll step right up and play devil’s advocate. Why might a BHO be impractical or a non-starter? (I’ll toss in some attempts at rebuttal too. Your mileage may vary.)

  • It’s one step forward, two steps back.

    IE7 was a Windows HTML Component (HTC) in a past life. Today it is sitting pretty over in standards-friendly ECMAScript-land. Why go back to Windows-only mode and keep IE7 from extending beyond Windows IE’s CSS issues? (Well, are there other browsers out there with CSS issues? No, I mean a monotonically increasing array of really dodgy ones.)

    Actually, I see no good reason not to forge ahead with the ECMAScript “reference version” of IE7. I just think that a BHO version could stand to pack a bigger punch where MSIE is concerned. Besides, I think Dean originally called it IE7 for a reason … !

  • This could backfire when MSIE7 is released.

    The same can be said for Dean’s IE7 too, but I expect all the bases can and will be covered sanely in either case. Also consider that MSIE7 will go through one or more beta releases. There ought to be time to soak things in and plan accordingly.

  • Why spend time helping Microsoft on your dime? Viva la resistance!

    Listen, as thankful as I am for all the other standards-friendly browser alternatives out there, I also remember quite vividly the day I faced reality and finally traded in the “enemy” Netscape Navigator 4 for the “clearly superior” MSIE. It was a welcome breath of fresh air, no question!

    Granted, “that was then, this is now,” but facts is facts:

    1. The whole “degree of CSS compliance” issue resonates largely with web developers, not end-users. Even so, if you consider end-users as the ultimate benefactor at the end of the day … why not be a li’l altruistic?
    2. Kick and scream all you want, but MSIE is still the flavor of the month in my neck of the woods and elsewhere. “It is what it is” … and if you believe it might be lemon flavored, you might as well try to make some lemonade. That’s what Dean did, after all.

    “When life hands you a lemon, say ‘Oh yeah, I like lemons. What else you got?’” (Rollins)

  • You can’t install a BHO without the user somehow getting involved.

    As ECMAScript, an IE7 “install” is rather stealthy, unless client side scripting happens to be disabled (in which case it’s rather dead-in-the-water). By comparison, a BHO is loaded once in MSIE and is “always on” (unless it happens to be disabled, in which case … you know).

    Here’s the rub: Installing a BHO requires some action on the user’s part, explicit or otherwise. That’s generally considered a drawback. Moreover, since ECMAScript doesn’t have the run-of-the-house like a BHO does, any attempt at a surreptitious BHO install is likely a “bad PR move” anyway.

    Speaking of bad PR moves, here’s one from the “most damning testimony ever” department:

  • BHOs are the premier spyware playground, bar none.

    My neighbors (who don’t even know what BHO stands for) are more than happy to tell their horror stories to anyone within earshot, spreading the meme ever wider. “All BHOs are spyware. Gotta catch ‘em all!” Indeed, the Add-on Manager in XP Service Pack 2 (or Spybot - Search & Destroy, BHODemon, etc.) all allow for easy disabling of BHOs.

  • Insert your favorite cautionary tale here.

Right. So … don’t bother? Go home? Are there any positives here? Let’s see …

“Make it Work. Make it Right. Make it Fast.”

Dean had his priorities straight from the outset: “IE7 will sacrifice performance in favour of standards,” he wrote. Not to rest on his laurels, Dean has also spent plenty of time coaxing every ounce of performance he can get out of the ECMAScript. At some point, however, you can’t help but reach a ceiling, a point of diminishing returns. A BHO, being a Windows DLL, affords the opportunity to make IE7 faster, perhaps “stupid-fast.” (Kind of like those hyperaccelerated aliens in Star Trek season 3, episode 11. Only without the I Dream of Jeannie wardrobe. Or the buzzing.)

It’s not all about the “need for speed” either. For example, there’s currently no support in IE7 for print media, stylesheet switching, inline styles or dynamic adjustment to programmatic edits. After reading the IE7 source code at least four times, cover to cover (which only left me more impressed BTW), I’m now thinking a BHO could tackle all of these items quite handily, leading to a more well-rounded offering. Worth a shot, at any rate.

Bottom line: Increased speed, efficiency and efficacy can make a difference, be they perceived or real improvements. Every bit helps.

The Helping Friendly BHO

This wouldn’t be the first time BHOs were conceived with good intentions. Case in point: In 2002, IBM created Web Adaptation Technology inspired no doubt by the W3C Web Accessibility Initiative (and written as, of course, a BHO). Among other things, it “enlarges text to enhance the readability of Web pages” and “reduces visual clutter when viewing Web pages.” Today, this technology is available as the award-winning WebAdapt2Me. Bravo IBM! (Also of interest: A PowerPoint presentation by Beth Tibbitts from the 2002 XML Conference/Expo explains how the BHO model is leveraged, complete with code examples.)

Of course there are other examples. Adobe Reader, Google Toolbar, Yahoo! Toolbar, most Windows popup/spyware blockers - they all incorporate a BHO somewhere along the way.

There is a major difference to keep in mind, however: IE7 is more of a behind-the-scenes secret agent - out of sight, out of mind. It isn’t, excuse the pun, flashy like the others. Not even WebAdapt2Me. After all, why should people expect to install something “just to look at web pages?” It doesn’t make all that much sense.

Or does it? Familiar with Greasemonkey for Mozilla Firefox? Turns out Todd Ostermeier has created a version for Internet Explorer, aptly named GreasemonkIE. Not only is it written as a BHO, but, from what I can tell, a Managed BHO (C# and .NET) to boot! Good move, Todd.

Update: As of 9 April 2005, GreasemonkIE is no more. My thanks to Todd for blazing a new trail in the “Useful BHO” category and inspiring others (e.g., me) to do the same.

Bottom line: Respectable precedents have been set. IE7 might do well to follow in their footsteps.

(Not) Up For Adoption

Even if MSIE7 did get up-to-speed with CSS, not everyone is going to be on that boat.

If I understand correctly, the commitment-at-present is for MSIE7 on XP Service Pack 2, but I also know plenty of people who insist on using Windows 2000 (or 98, or 95 … or even Windows ME). Why? Ostensibly to avoid current spyware, viruses, and other gremlins. They don’t even want to be bothered with installing antispyware, the rationale being “It’s a lot safer to use an earlier version of Windows.” Even if it isn’t patched/up-to-date? Even if it has long since been end-of-lifed? “Yes,” I’m told, that’s a compromise worth making, a risk worth taking.

In other cases, folks have no say in the matter or, for whatever reason, they simply aren’t in a position to upgrade. They have to use the Windows version and browser they’ve been dealt, period. My parents, for example, depend on sites that make extensive use of ActiveX, thus they must use MSIE for those sites. Not to make this a Firefox-vs-MSIE debate (it’s not) but I’ve observed that, even though they have Firefox installed, they tend to keep using MSIE anyway since it’s already running and they know it will work for the ActiveX cases. Or, to hear either of them put it: “Some of my web sites break in other browsers. I’ll keep it simple and use Internet Explorer.”

Meanwhile, web developers are stuck wrestling with the 80/20 rule in reverse: 20% of the time is spent developing for “other browsers” and the remaining 80% is spent “making it work” in MSIE. To be fair, that ratio tends to improve with increased experience and acquired skill. If that’s the camp you fall into, consider yourself somewhat fortunate. To this day I still hear stories of neophyte web developers trying to follow the standards using MSIE, only to eventually throw up their hands in exasperation. (Haven’t they ever heard of the css-discuss Wiki?)

Be it ECMAScript or a BHO, IE7 would be well-positioned to transcend all of the Operating System hubbub … but, again, I see the BHO as having more of an edge when it comes to MSIE.

Going Global

Let’s suppose an IE7 BHO is just what the doctor ordered. Would that somehow bring it one step closer to the proverbial tipping point and lead to widespread adoption? If done well, I think it could. To borrow Gladwell’s terms, I’m hopeful we might find some connectors, mavens or salesmen to help out along the way.

This quote was, up until recently, on the Microsoft FrontPage site: “With so many browsers, consistency is key. If your Web sites don’t display well on multiple browsers and at varying screen resolutions, you could be missing out on key audiences.” Now that’s what I’m talking about!

The Name of the Game

While there has already been plenty of discussion on the name IE7, I’ll toss one more name into the ring: Rosetta.

“A little green rosetta. You’ll make a muffin betta.” (Zappa)

Any Takers?

Enough of my yappin’. Here are some resources ripe for the picking:

Who out there has Visual Studio and some free time on their hands? Obviously Todd has VS … plus I do too, only it’s rather painfully slow on Virtual PC/Mac. Ahh, the price of switching.

Regardless, I’ll be happy to pitch in as well. You know how to reach me.

Posted by joe at 12:00 PM

Trackback Pings

TrackBack URL for this entry:


Dean Edwards of dean.edwards.name/ writes:

Hi Joe,

We’ve already discussed this by email so you know what I’m going to say.

I think this is an interesting idea but I don’t think you’ll ever get to that “tipping point” without help from Microsoft themselves. That said, I’d still like to see you build this BHO. It might mean that site owners could provide a mechanism to install the object. People are still scared of installing these things - that’s where some kind of approval from Microsoft or other respected company would help.

You’ve got to build it first!

# 31 March 2005, 01:08 PM -05:00

Todd Ostermeier of HASH(0x8da8d38) writes:

Interesting argument. For all of the power BHOs have, they have some pretty odd limitations as well. For example, it seems that IWebBrowser2 doesn’t fire an event for DocumentComplete when you just refresh a web page. That’s a pretty big hurdle to overcome, especially if you’re modifying page presentation and get to watch all of your hard work disappear if the user hits F5. Also, as with everything else, not all versions of IE are created equal. BHOs have been around since IE4, but the IWebBrowser/IHTMLDocument/etc interfaces have changed and evolved in many ways (for example, there are now four or five IHTMLDocument interfaces), and what you may be able to do in IE60 for XPSP2 may fail horribly in IE 5.01 for Win2kSP4 (which is still a supported browser, if you can believe it — support for the browser that shipped with an OS or service pack continues until that OS or service pack is end-of-lifed).

However, we’ll never know if nobody ever tries. I have a feeling GreasemonkIE is going to eat up what little free time I have, but at the same time that project will be working towards the same goal. The holy grail for GreasemonkIE is to be able to take any Greasemonkey user script built for Firefox, install it, and it just runs. That means a lot of work massaging the DOM, wrapping jscript functionality, etc.

As Dean said, you’ve got to build it first. Get a proof-of-concept out there and work out the issues as you find them.

# 31 March 2005, 10:01 PM -05:00

Joe writes:

Dean, Todd: Thank you both for weighing in! I really appreciate the encouragement and the reality checks.

For a little while I was actually debating whether or not I should keep it .NET or revert to ATL (shudder). Ultimately, I decided it’s best to follow the “keep it simple” rule and go with .NET. As a result, between some additional research and receiving a surprise email bearing some sample code (credit yet to be given), I’ve managed to make a rather satisfying dent in the scaffolding.

Following the proverbial David Allen method then, the very next task is to get the scaffolding up and running sanely, nevermind IE7 just yet. Stay tuned …

# 31 March 2005, 11:10 PM -05:00

Todd Ostermeier of HASH(0x8da6e48) writes:

If you find a better way to keep a BHO from loading in explorer.exe than the mscoree.dll wrapper at http://codeguru.earthweb.com/Csharp/.NET/net_general/article.php/c4671/, please let me know. I just updated GreasemonkIE to incorporate that wrapper since I haven’t found any better solution. (I found that before link in my own searches for BHO stuff, but your link above reminded me about it.)

Good luck!

# 1 April 2005, 01:10 AM -05:00

Joe writes:

Todd, funny you should mention that. Yes, I do believe I have a few options for keeping Windows Explorer out of the mix … and I think one of them does not require mscoree.dll.

Of course I could also be hallucinating. (It is, after all, 1 April.) I’ll check once I’m back on the Mac, “where I keep the links.”

# 1 April 2005, 01:24 PM -05:00

Post a comment

(will not be published)

Remember Me?

(you may use HTML tags for style)