Chapter 14. Developing cross-browser strategies
This chapter covers
- Developing reusable, cross-browser JavaScript code
- Analyzing cross-browser issues needing to be tackled
- Tackling those issues in a smart way
Anyone who’s spent time developing on-page JavaScript code knows that a wide range of pain points exist when it comes to ensuring that the code works flawlessly across a set of supported browsers. These considerations span from providing basic development for immediate needs, to planning for future browser releases, all the way to reusing code on web pages that have yet to be created.
Coding for multiple browsers is a nontrivial task that must be balanced according to the development methodologies that you have in place, as well as the resources available to your project. As much as we’d love for our pages to work perfectly in every browser that ever existed or will ever exist, reality will rear its ugly head and we must realize that we have finite development resources. We must plan to apply those resources appropriately and carefully, getting the biggest bang for our buck.
Because of this, we start this chapter with advice on choosing which browsers to support. This is followed with a discussion of the major concerns regarding cross-browser development, as well as effective strategies for dealing with such problems. Let’s jump right into ways to carefully choose supported browsers.