Testing on multiple browsers and platforms

No doubt you'll have a browser that you prefer to develop in, which is likely to be a modern, standards-compliant browser, such as Chrome, Firefox, or perhaps Safari. But you'll need to ensure that your themes work just as well in other browsers too. By debugging throughout your development process, you'll reduce the number of browser compatibility problems and spend less time at the end hacking your code, or putting in place fixes aimed at one browser (normally IE).

Which browsers to support

You'll need to decide which browsers your theme will support and which versions of them. This will depend on what you're developing your theme for—is it for a client or for release to the public? The browsers supported by most developers at the time of writing are:

  • Google Chrome
  • Firefox
  • Safari for Mac
  • Opera
  • Internet Explorer version 7 onwards (or sometimes 8 onwards).

Very few themes now support IE6, and this is the right approach. Microsoft themselves want us to stop supporting IE6, as you can discover at http://www.ie6countdown.com.

Approaches to browser support

There are two approaches to ensuring cross-browser compatibility—progressive enhancement and graceful degradation. Let's take a quick look at the difference between these.

Graceful degradation

Graceful degradation is the process web developers have traditionally used. It involves developing in a modern browser and then putting in place fixes for anything that doesn't work in older browsers, such as IE6 and IE7.

This approach feels easier to start with, as it makes the initial development more straightforward, but can mean a lot of extra work at the end of the process, and a lot of extra code to get things working in older browsers.

Progressive enhancement

Progressive enhancement is the opposite of graceful degradation. It involves developing in a way which is cross-browser compatible, so that your layout and basic styling works across all of the browsers you're supporting, and then adding extras for those browsers that support it, such as CSS3 styling. The extras you add aren't essential to the site, so it won't matter if users on older browsers can't see them.

This method can be much more efficient and result in tidier code, but for many developers, it entails a shift in thinking.

Whichever approach you adopt, I would recommend one very important thing—don't save your browser testing till the end of your development process. Keep checking as you go along, and then you can make small adjustments or fixes instead of having to do a lot of extra work at the end.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.19.251