Sunday, July 02, 2006

Browser Wars

Every now and again I'd like to take some time to talk about something else, other than my life with the McQueens. This is one of those times.

I am a professional web developer. I spend my day at work developing web pages. And I have come to a conclusion. MicroSoft's Internet Exlorer costs technology divisions, probably in the end, millions of dollars a year.

How can this be?

Well, let me explain how it works. Ever wonder how web pages are made?

Web technology is like most other technolgies. There are two distinct components: the nuts'n'bolts and the interface. The nuts'n'bolts is the part you don't see. It's the part you don't need to know about to use the technology. It's the engine inside a car; CPU + mobo + memory + storage in a computer. The interface is the part you do see. It's the part you interact with. It's the steering wheel+the instrument panel + the gas pedal+the brake pedal + etc. in a car; the monitor + the keyboard + the mouse + the printer + the speakers + etc. on the computer.

It's also pretty clear that the quality of the nuts'n'bolts and the quality of the interface are largely independant of one another. Just because you have a great working car doesn't mean it's going to be nice to look at. And just because it's nice to look at doesn't mean its going to make it past 150 000 km.

Web pages are a number of technologies working together to make the coolest thing since sliced bread. You've probably heard of HTML. That's the basic "language" web pages are written in. Another "language" is called CSS, or Cascading Style Sheets.

The HTML part is the data that makes up the page; the text, the links, the pictures, etc. The CSS part defines how that data looks; what colours are used, the layout, etc.

Web browsers (like Internet Explorer, Firefox, Opera, Safari, etc.) download these files (HTML and CSS files), read them, try to figure out how to display them, then show them to you, the user.

What's this, you say? "What do you mean 'try to figure out how to display them'? Aren't these languages well defined? 'Trying' implies that it might not know how to do it. It might fail."

You're question of the languages being well defined is a good one. In fact, the languages are mostly well defined. A group called the World Wide Consortium (W3C) defines those, and other web technologies. They say "this tag means that, and this style should be rendered that way."

In theory, people who program web browsers should take those definitions (aka: recommendations (like standards, but technically not standards)) and write their browsers to those definitions. That way, if a web page is written to those specifications, then any compliant browser should render the page in much the same way.

This is very important because not everybody is viewing the internet on a high speed connection with IEv6, with high resolution. Some people are browsing with graphics turned off. Some are viewing with cell phones, and BlackBerrys. Some are using FireFox. Some are using Safari or Camino on Macs. Some are using Linux.

What's this, you say? "Those people are a very small minority aren't they?"

Not as small as you may think. It's estimated that 20% of people have special viewing requirements, such as large fonts, large resolution, screen readers, etc. In fact, on this Blog, IE users are in the minority! The vast minority! There are more Mac users, and more Linux users than Windows 2000 users viewing this blog.

One of the ideals of the internet and the world wide web is complete open standards. Anyone can write a web page, and anyone can view it. If a page is written to the "standards" then even a blind person can view the webpage without issue. If it's not written to standards, it might give that blind person an awful hard time. If it's not written to the "standards" then a Mac or Linux user might not be able to read that page.

What's this, you say? "So, what's this have to do with costing technology divisions lots of money?"

The reason is this. Sadly, IE has such a huge market share that it cannot be ignored. Where I work (where there are thousands of users) it's the only browser we're supposed to use. (Alright! I confess! I've downloaded, and use FireFox!) In fact, a lot of web programmers seem to think it's the only browser, so that's what they write for.

The process goes something like this:

  1. Write some code.

  2. Load it in IEv6 to see if it looks right. If not, go to step 1 until it looks right.

  3. Repeat until page or site is finished.


But there's a huge problem with this:

IEv6 is far off the mark when it comes to the W3C "standards".

There are a lot of parts of CSS and HTML (and others) that IEv6 does not support. Instead, it introduces its own code, unique to IE browsers. This is "bad news bears." This violates one of the founding principals on which the WWW was founded, and what makes the internet, as we know it today, so great. One could argue that adding proprietary extensions isn't a bad thing. But I'm not talking about proprietary extensions. I'm talking about replacing an open standard with a proprietary one.

The problem with being pretty far off the mark is that if there's no standard as to what's right and wrong, they can change at will, and mess everything up. So a page that works perfectly in IEv6 may break when IEv7 comes out, and may be back to pefect for IEv8. It's completely unpredictable!

What is a web developer to do?

What a professional web developer does (as opposed to a script kiddie) is he develops to the "standards" and tests pages in mutliple browsers (with IEv6 being last, or not at all), and validates his code with the W3C. Then, he works on IEv6. Here's how the process might work:

  1. Write code

  2. Test in FireFox, and/or Opera. If it doesn't work, repeat steps 1 and 2 until it does.

  3. Test in IEv6. It won't work. Search the internet to find hacks to make it look right. Continue going through steps 1 and 2. Don't proceed to step 3 until step 2 passes.


Writing to standard code, once you know how, can be pretty fast. But throwing together hacks to make it work in IEv6, and still keep compliant is a right royal pain in the neck and can take ten times longer than writing the compliant code in the first place. And time is money, and that extra time/money is what's costing the industry lots of money.

It may seem I'm being hard on IEv6, and maybe I am. But it seems to me that it's such a bad browser (technically speaking) that it shouldn't even be seriously considered to be a usable product, especially in a professional setting.

If you doubt me, if you think your IE is good enough, check out the ACID2 test. Unfortunately, FireFox doesn't even pass that test. :( Opera, and Safari 2 do.

What's this, you say? "I'm not a web programmer, so what does this have to do with me?"

Well, probably not much. The reasons you should switch from IE have more to do with security, viruses, spyware, etc. plus the added features like tabbed browsing, extensibility, etc. that come with browsers like FireFox, and Opera.

Plus, if you switch from IE you will get the added satisfaction of "sticking it to the man". (I'd say, that, alone, would be worth the switch.)

1 comment:

Anonymous said...

wow i stopped reading what i thought was about half way through that only to find there was way more after it than i had thought :P