Hacker News new | ask | show | jobs
by philipwalton 18 days ago
If your feature use policy is that you will never use any feature unless it's supported in at least X, Y, and Z browsers, then yes something like this would be possible. But most sites don't have a policy like that.

Most sites are willing to use some features as a progressive enhancement, whereas other features they won't even consider using unless it's in 99+% of their users' browsers.

And unfortunately there's no easy way to make that decision for users on a feature-by-feature basis, because it all depends on what use case they're trying to accomplish, and what will happen if the feature is not available (given that particular use case).

So our approach is to (1) explain in the guide how to implement the use case with the modern feature, (2) explain why the modern feature is the preferred solution (e.g. what the user benefit is), and then (3) explain how to implement a fallback solution if the feature is not available.

I think we could potentially experiment with some version of what you're describing, like a config option where we only surface guides that have robust, widely-available fallbacks, and where we have high confidence that it makes sense for the majority of sites to be following the recommendations in the guide.

I'll raise it with the team.

1 comments

> But most sites don't have a policy like that.

My experience differs from yours. It's true that there is some tiny fraction of features where it makes sense to do progressive enhancement, but for most sites and almost all features this does not make sense: the burden of testing and maintaining a site that effectively has multiple versions depending on what browser you're using is simply not worth it. For typical dev teams outside of Google/Meta/similar, the right thing (and the overwhelmingly common thing) is to target the intersection of features available on your supported browsers and not make any behavior conditional. I'm not interested in any guides that need fallbacks on any of the browsers I target and I expect the same is true of the typical dev team outside Google.