Note: this site can be alternatively titled Why Web Development is a total PITA.
If you've been surfing through any of my sites (TravelLogs, NoSoupForYou), by now you are probably pretty tired of my disclaimers about Best viewed with an XHTML-compliant browser and my endless bashing of the fact that IE is the most popular browser. Well, I wrote this page with the purpose of expressing my frustration with web development by showing how various browsers behave on sites I've worked on. I figured it's unlikely most people ever bother running more than one browser so it would be nice to show snapshots to let you compare them. I feel many web developers share some of the same feelings I do so hopefully this can be somewhat informative.
Note that I'm, by far, not an advanced web developer and I definitely don't do it for a living (mainly, well, because of what I talk about here). All issues I discuss are problems I ran into while working on some of my sites and testing them across multiple browsers. I hope that by the time you're done reading this page I have convinced you of how important standards are in general. I also hope that, if you are in fact running one if the non-compliant browsers, you decide to upgrade to one that better supports these standards.
All languages have rules that make it possible for two or more people to understand each other because it is assumed they're both following those rules we've all learned over time (some of us have more difficulty adapting to these rules because, perhaps, we grew up learning another language's rules). Regardless, we are aware that every language has its own set of rules we must follow if we want to communicate with others.
Programming languages are no different. Each language has rules that generally have to be followed so an application can interpret the code correctly. In the case of languages like C++, the application I'm referring to (known as the compiler) is responsible for translating the code written by the programmer to another language that can be understood by the processor. The compiler then generates errors if it encounters a problem in the syntax (spelling and sometimes grammar).
So, how are these rules set and who sets them? Generally, a document is published by the organization or corporation in some way responsible for the language. As an example, Java is a proprietary language developed by Sun Microsystems so they control its standard and decide what features it supports. HTML & CSS, however, are open standards and are controlled by an organization known as the World Wide Web Consortium (W3C, for short).
In the case of HTML & CSS, your browser is the application responsible for interpreting the code (such as this very page) written by others (such as myself). Currently, I feel there are two major problems with these browser applications:
Unlike C++ and most other languages, browsers don't care too much if the syntax is incorrect and, in most cases, will display (or render) the document without giving the author any indication of the error.
Now, in my opinion, this is a fault because it allows the person writing the page to believe the code is correct (thus, inventing their own dialect, in a way) and while the error may not affect the output initially, it may manifest itself as more content is added. Even worse, the problem then may propagate as readers are able to look at the page's code and replicate the error in their own pages.
The two major browsers were developed by companies who, in some cases, chose to ignore web standards and / or implemented features differently or added features not set by the document (standards do take some time to be written because, well, anything in a bureaucratic system just does).
This is even a bigger problem than the first as it forced web developers to either write multiple versions of the same document or hack the code in ways to make it work in both major browsers.
While the first problem may never go away, there's hope for the second one as two things have been taking place: 1. the newest version of HTML (XHTML 1.0 and above) has simplified the language's syntax by reducing the number of features thus forcing (or trying to, at least) the use of CSS for controlling layout and style, and 2. recent versions of the two major browsers have started to adhere closer to the W3C standards which means developers can start expecting more consistency. However, with a good amount of people still using older browsers, developers continue to find themselves hacking HTML code to make most browsers happy.
So, you might be asking yourself: What's the big deal? I've
written all kinds of pages that always look fine in all browsers
.
Well, lucky you. The problem may never show up if you are one of the
old-skool web developers who uses tables for controlling page layout.
All browsers can render a table just fine. However, by controlling
the layout of every page with tables and setting properties such as
fonts and colors using HTML attributes, you might then need to
potentially edit EVERY document for something as simple as changing
the background color of all paragraphs.
You see, we're moving toward site design that separates content (HTML) from layout and style (CSS), a technique being pushed by many developers (see Glish, WebReference.com, and A List Apart to name a few). So, why is this happening? Because sites end up being simpler, require less code (in almost all cases), and are easier to maintain. In addition, generating different versions of the site for different media (printer-friendly version, PDA version, etc.) can be done without changing one line of HTML. Put these all together and you get one huge advantage: less time is needed for site creation and maintenance. (You might still disregard this point by claiming that tables work and you shouldn't fix something if it is not broken. Ok, then how about this: ever wonder if your site is ADA compliant? Frames and excessive use of tables for controlling layout is discouraged as aural browsers may not be able to interpret them correctly).
Now, I understand that not everyone has the bandwidth to download an upgrade for their browser as it can take some time because of their size. Also, I imagine not everyone can upgrade to the newest spiffy version of IE or Netscape because they run older hardware which Microsoft may consider obsolete. However, newer browsers have appeared, providing not only good alternatives to the two mainstream ones but also more ways to obtain an upgrade.
So now, let's talk about the browsers.
I'll be comparing portions of HTML code I wrote while designing various pages and how they were rendered by various browsers (Keep in mind that I don't personally have access to multiple computers with multiple versions of each browser so I was not able to test every possible combination). From what I've gathered, here's a list of the most popular browsers currently used:
As I work on a site, I test it with my main browser (Mozilla,
running under Linux) and the latest version of IE (running under a
virtual Windows 98 machine thanks to VMWare). I use Mozilla because it
is probably the closest to supporting most features set by the W3C
standards and, as I mentioned above, since Netscape 6.x is based on
it, I expect most people running Netscape 4.x to make the switch
eventually. I test on IE 6.x because, well, everyone has IE thanks to
Micro$oft's monopoly (as Bill G. said on the
Simpsons: Ok, boys, buy 'im out
) so I expect most IE people to
eventually upgrade to it (else, Bill G. will buy them out). I hear
good things about both Konqueror and Opera and just recently
downloaded their latest versions.
As far as IE 6, it is very comparable to any version of Mozilla greater than 0.93 (or Netscape 6.x and above). However, IE 6 lacks support for some features that make my life easier (so, who cares about my life being easier, right? Well, you are reading my work, aren't you?)