Skip to Main Content
Professional, JavaScript® for Web Developers, Second Edition
book

Professional, JavaScript® for Web Developers, Second Edition

by Nicholas C. Zakas
January 2009
Intermediate to advanced content levelIntermediate to advanced
836 pages
21h 30m
English
Wrox
Content preview from Professional, JavaScript® for Web Developers, Second Edition

Chapter 9. Client Detection

Although browser vendors have made a concerted effort to implement common interfaces, the fact remains that each browser presents its own capabilities and flaws. Browsers that are available cross-platform often have different issues even though they are technically the same version. These differences force web developers to either design for the lowest common denominator or, more commonly, use various methods of client detection to work with or around limitations.

Client detection remains one of the most controversial topics in web development. The idea that browsers should support a common set of functionality pervades most conversations on the topic. In an ideal world, this would be the case. In reality, however, there are enough browser differences and quirks that client detection becomes not just an afterthought, but also a vital part of the development strategy.

There are several approaches to determine the web client being used, and each has advantages and disadvantages. It's important to understand that client detection should be the very last step in solving a problem; whenever a more common solution is available, that solution should be used. Design for the most common solution first and then augment it with browser-specific solutions later.

Capability Detection

The most commonly used and widely accepted form of client detection is called capability detection. Capability detection (also called feature detection) aims not to identify a specific browser ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional: JavaScript® for Web Developers, Third Edition

Professional: JavaScript® for Web Developers, Third Edition

Nicholas C. Zakas
JavaScript: Best Practice

JavaScript: Best Practice

James Kolce, Moritz Kroger, Ivan Curic, Samier Saeed, Jeff Mott, M. David Green, Craig Buckler

Publisher Resources

ISBN: 9780470227800Purchase book