min read

But what's the browser support?

Too often when I get excited about some new browser API and I discuss it with colleagues I'm met with the dreaded question we've all heard: "But what's the browser support?"

If you get excited about new APIs you've heard this too. What's most discouraging about this question is that as soon as you hear it you know there's only 1 acceptable answer in their head: all browsers.

Do you really want to build your app optimized for the worst browsers that a fraction of your customers will use? Do you want to tell the vast majority of your customers: You can't have this nice feature because 8 out of 100 people wouldn't be able to use it?

Graceful degradation allows you to adopt new APIs while providing an equivalent, if slightly less nice, experience to non-supporting browsers. Use it.

There are some APIs that are difficult to degrade, and in those cases more caution is justified. For the most part though, it's as simple as:

if(navigator.shinyNewFeature) {
  // Ooh yeah! 💪
} else {
  // Plain experience here
}

So the next time someone kills your buzz about a new web API, remind them that you aim higher than a lowest common denominator experience in your apps.