Testing for Multiple Browsers
In the past decade, the web browser landscape has changed dramatically. At the end of the browser wars (Netscape vs Microsoft Internet Explorer), Microsoft was victorious, and Netscape seemed to lay floundering with no hope for recovery.
After Netscape’s quiet descent into the open source world, releasing Mozilla, and its eventual resurgence with Mozilla Firefox, developers who had become lazy, coding only for Internet Explorer (IE), were faced with a new dilemma.
Microsoft ending support for its IE version for Macs also helped to usher in a new browser from Apple: Safari. Add Opera and now Google Chrome, and the chance that coding for one browser and actually having your site look the way you intended on all the others, becomes very slim.
Browser market share aside, it is just part of web design best practices to make sure your website can reach as wide of an audience as possible. That means developing sites that work on desktop browsers, tablets, netbooks, screen readers, and mobile phones.
The easiest way to ensure cross-browser compatibility is to code according to W3C standards. Unfortunately, even that alone will not guarantee your site will be uniformly identical across all browser platforms. It will require testing, re-testing, and patience.
There are a number of issues to consider when designing for multiple browsers:
1. XHTML support -Â At this time, most current browsers support all XHTML functions, but you may still need to check some.
2. CSS support – This is spotty, depending on the browsers.Â There are some features Microsoft may choose to never support.
You will have to evaluate browser compatibility for CSS on a per-selector basis.Â None of the browser makers implement support for a particular version of CSS across the board.Â Instead, adoption is gradual, and more support is typically added with each release.
CSS2 is currently supported on IE8, IE9, Firefox 3.x, Safari 4 and 5, Google Chrome 4 and 5, and Opera 10.x.
IE8 does not come close to supporting CSS3, while the other above-mentioned browsers nearly support it but not perfectly.
For example, the box-shadow selector in CSS3 is supported by some but not others, and some of the browsers require specific indication that you are coding for them. IE 6, 7, and 8 do not support it at all, while IE9 is said to support it fully. Firefox 3.0 does not support it, while 3.5 and later supports it with the -moz- indicator. Similarly, Webkit-based browsers like Safari and Chrome support it with a -webkit- indicator. Opera supports it since version 10.53.
My point in mentioning this example is to show you that, while there are some great features available in the newer standards like CSS3, you will still have to use some old hacks to get true cross-browser compatibility.Â For a box shadow, for example, you will have to rely on images, unless not having the shadow in some browsers will not affect the overall quality of the site.
4. Future features (i.e. HTML5) – All of the browsers still need improved support for future HTML features.Â There is nothing wrong with coding for the future to make sure your sites will stand the test of time and still be compatible with browsers that do not have support.
If you do include any HTML5 functions in your website (like the video tag for iPad compatibility), you should also include an alternative, since most browsers will not be able to view whatever you insert.
5. Backwards compatibility – The sad truth is that some people still have old computers with old browsers like Internet Explorer 6.Â You will probably not be able to make a site look perfect in newer browsers and IE6, but it does not hurt to make some effort to ensure your site at least still functions on antiquated technology.
How to Test
I have repeatedly stressed that you need to test browser compatibility, but actually being able to do that may not be easy.Â If you have a Windows computer, you will be able to test all of the major browsers: IE, Firefox, Safari (albeit not in a truly Mac environment), Chrome, and Opera.Â If, however, you are on a Mac, you will not have access to Internet Explorer.
There are a couple of options.Â One is to use a virtual machine like Parallels, Vmware, or VirtualBox (free) and install Windows in it.Â This will allow you to view IE performance in an actual Windows environment.
Another option is to use a compatibility site, a website that allows you to view how your website will look in multiple browsers.Â Some popular ones include:
In addition, you should also run HTML and CSS standards tests:
It may be more difficult to find testing sites that accurately display how your site will look on a mobile browser, but most are based on one of the major rendering engines like Webkit, Gecko, or Opera’s engine.Â If you are truly unsure, you can try some of the mobile browser emulators available for download.
Finally, always make sure your site is accessible and can stand up to odd resolution changes (especially common with digital projectors), and other atypical displays.Â Once you have all of that settled, you can actually begin working on content.